相关疑难解决方法(0)

JavaFX TextArea中的模糊文本

我对JavaFX有一个奇怪的问题.我Scene在SceneBuilder中设计了一个简单的东西.文本在预览中看起来没问题,但在运行应用程序时文本看起来模糊,请考虑以下图像. 例 这是FXML:

<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>

<AnchorPane id="AnchorPane" fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="br.mviccari.javafxtest.controllers.TelaMensagemController">
  <children>
    <TitledPane alignment="CENTER_LEFT" animated="false" collapsible="false" contentDisplay="LEFT" prefHeight="400.0" prefWidth="600.0" text="Janela legal" textAlignment="LEFT" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
      <content>
        <AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
          <children>
            <HBox id="HBox" alignment="CENTER" spacing="5.0" AnchorPane.bottomAnchor="14.0" AnchorPane.rightAnchor="14.0">
              <children>
                <Button mnemonicParsing="false" onAction="#acaoFodase" prefHeight="53.9609375" prefWidth="128.0" text="Foda-se" />
                <Button mnemonicParsing="false" onAction="#acaoOk" prefHeight="53.9609375" prefWidth="128.0" text="OK" />
              </children>
            </HBox>
            <TextArea fx:id="campoTexto" disable="false" …
Run Code Online (Sandbox Code Playgroud)

java javafx

10
推荐指数
1
解决办法
5452
查看次数

JavaFX图形"模糊"还是反锯齿?(没有使用效果)

我正在创造一些形状来学习,一切似乎都模糊了,就像一些抗锯齿,我没有使用任何效果(我还没有得到这些课程,哈哈).

例如,我在1像素宽度的黑色背景中绘制一条白线,但它变灰了!如果我将宽度更改为2px,它会变为白色,但仍然没有真正定义.

当我"googleing"时,我发现的一切都是setSmooth(false)关于形状的方法,但它没有任何区别.在舞台或场景中我应该改变或禁用的任何东西我都不知道?

任何帮助表示赞赏.谢谢你的建议......

抱歉我的英语仍然需要改进lol ...但这不是我的自然语言.

java javafx

6
推荐指数
1
解决办法
5943
查看次数

拖动后ScrollPane内容变得模糊

JavaFX 8.0有此错误,我不知道如何解决。
示例:http//i.imgur.com/tavh6XA.png

如果拖动ScrollPane,其内容将变得模糊,但是如果将其拖动回,则内容将恢复其清晰度。如果我不修改坐标,则内容看起来会很好。

有人解决了这个问题吗?

示例代码:

@Override
public void start(Stage stage) {
            Pane pane = new Pane();

    Scene scene = new Scene(pane, 500, 500);
    pane.prefWidthProperty().bind(scene.widthProperty());
    pane.prefHeightProperty().bind(scene.heightProperty());

    ScrollPane scroll = new ScrollPane();

    // Center ScrollPane
    scroll.layoutXProperty().bind(pane.widthProperty().divide(2).subtract(scroll.widthProperty().divide(2)));
    scroll.layoutYProperty().bind(pane.heightProperty().divide(2).subtract(scroll.heightProperty().divide(2)));
    scroll.setPrefSize(200, 200);

    ListView<String> list = new ListView<>();
    scroll.setContent(list);

    list.getItems().addAll("Resize the window", "and see how this list", "becomes blurry");

    // Label indicates x, y coords of ScrolPane and their ratio.
    TextField size = new TextField();
    size.setPrefWidth(500);
    size.textProperty().bind(
            scroll.layoutXProperty()
            .asString("x: %s; ").concat(
                    scroll.layoutYProperty() …
Run Code Online (Sandbox Code Playgroud)

java javafx-8

5
推荐指数
3
解决办法
2381
查看次数

将AnchorPanes添加到ScrollPanes Javafx 8

在JavaFX中,当我向ScrollPane添加一个内置Label的AnchorPane时,整个AnchorPane有点模糊,好像它有一个Photoshop羽毛效果.我正在使用Java8最新版本.Java7不是这种情况.你以前遇到过这个问题吗?

javafx blurry java-8

4
推荐指数
1
解决办法
1731
查看次数

标签 统计

java ×3

javafx ×3

blurry ×1

java-8 ×1

javafx-8 ×1