-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8u301
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Java 8u301
A DESCRIPTION OF THE PROBLEM :
Hello!
We have serious JavaFX problems with our application since the release of Java 8u301. The problems don't exists in Java 8u291. We suspect that they are related to the fix ofJDK-8204568 (Relative CSS-Attributes don't work all time).
We provide the source code below. If you run it with 8u291 and then with 8u301 you will see, that the button/radio button are much bigger in 8u301 while the font size is the same. We expect the the size of the button/radio button to be unchanged.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.RadioButton;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Starter extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(final Stage primaryStage) {
primaryStage.setResizable(true);
Button button = new Button("Button " + System.getProperty("java.version"));
RadioButton radioButton = new RadioButton("RadioButton " + System.getProperty("java.version"));
VBox vbox = new VBox(button, radioButton);
vbox.getStyleClass().add("container");
Scene scene = new Scene(vbox);
scene.getStylesheets().add(getClass().getResource("/styles.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
}
}
---- styles.css ----
.root {
-fx-font-size: 12px;
}
.container {
-fx-spacing: 2em;
-fx-pref-width: 30em;
-fx-pref-height: 20em;
}
.button,
.radio-button {
-fx-min-width: 17em;
-fx-pref-width: 17em;
-fx-max-width: 17em;
-fx-min-height: 3em;
-fx-pref-height: 3em;
-fx-max-height: 3em;
}
.button .text,
.radio-button .text{
-fx-font-size: 1.5em;
}
.radio-button {
-fx-border-color: red;
}
---------- END SOURCE ----------
FREQUENCY : always
Java 8u301
A DESCRIPTION OF THE PROBLEM :
Hello!
We have serious JavaFX problems with our application since the release of Java 8u301. The problems don't exists in Java 8u291. We suspect that they are related to the fix of
We provide the source code below. If you run it with 8u291 and then with 8u301 you will see, that the button/radio button are much bigger in 8u301 while the font size is the same. We expect the the size of the button/radio button to be unchanged.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.RadioButton;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Starter extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(final Stage primaryStage) {
primaryStage.setResizable(true);
Button button = new Button("Button " + System.getProperty("java.version"));
RadioButton radioButton = new RadioButton("RadioButton " + System.getProperty("java.version"));
VBox vbox = new VBox(button, radioButton);
vbox.getStyleClass().add("container");
Scene scene = new Scene(vbox);
scene.getStylesheets().add(getClass().getResource("/styles.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
}
}
---- styles.css ----
.root {
-fx-font-size: 12px;
}
.container {
-fx-spacing: 2em;
-fx-pref-width: 30em;
-fx-pref-height: 20em;
}
.button,
.radio-button {
-fx-min-width: 17em;
-fx-pref-width: 17em;
-fx-max-width: 17em;
-fx-min-height: 3em;
-fx-pref-height: 3em;
-fx-max-height: 3em;
}
.button .text,
.radio-button .text{
-fx-font-size: 1.5em;
}
.radio-button {
-fx-border-color: red;
}
---------- END SOURCE ----------
FREQUENCY : always
- relates to
-
JDK-8204568 Relative CSS-Attributes don't work all time
-
- Closed
-