I'm using JavaFX beta 40, and define a simple scene containing just one Label like this:
@Override
public void start(Stage stage) {
Font f = new Font(53);
Label lbl1 = LabelBuilder.create()
.text("Grezi:\nZUI with JavaFX\nand\nGroovy!")
.font(f)
.prefWidth(200)
.translateX(100)
.translateY(100)
.build();
scene = SceneBuilder.create()
.width(800)
.height(700)
.root(lbl1)
.build();
stage.setScene(scene);
stage.setVisible(true);
}
(The complete source code is in attached file).
Then, if you move the cursor mouse around the windows, then the label font size changes to something more little (the default font size I suppose). More precisely, when you move the cursor in and out the label.
@Override
public void start(Stage stage) {
Font f = new Font(53);
Label lbl1 = LabelBuilder.create()
.text("Grezi:\nZUI with JavaFX\nand\nGroovy!")
.font(f)
.prefWidth(200)
.translateX(100)
.translateY(100)
.build();
scene = SceneBuilder.create()
.width(800)
.height(700)
.root(lbl1)
.build();
stage.setScene(scene);
stage.setVisible(true);
}
(The complete source code is in attached file).
Then, if you move the cursor mouse around the windows, then the label font size changes to something more little (the default font size I suppose). More precisely, when you move the cursor in and out the label.
- duplicates
-
JDK-8114207 HelloAlert font size in the pop-up dialog windows shrinks
-
- Resolved
-