-
Bug
-
Resolution: Unresolved
-
P4
-
8
-
Windows 8.1 64
Radeon 7850
Please, look at this code and screenshots.
When
primaryStage.setResizable(false);
is uncommented, frame created with thin white lines on perimeter like on screenshot.
When this line is commented, all looks fine (also on screenshot)
Sorry, can't find where to add screenshot, this is code
/////////////////////////////
public class Main extends Application {
final int W = 400;
final int H = 300;
@Override
public void start(Stage primaryStage) throws Exception{
primaryStage.setTitle("Hello World");
StackPane root = new StackPane();
Canvas canvas = new Canvas(W, H);
root.getChildren().addAll(canvas);
GraphicsContext graphicsContext = canvas.getGraphicsContext2D();
graphicsContext.setFill(Color.BLACK);
graphicsContext.fillRect(0, 0, W, H);
primaryStage.setScene(new Scene(root, W, H));
primaryStage.setResizable(false);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
////////////////////////////
When
primaryStage.setResizable(false);
is uncommented, frame created with thin white lines on perimeter like on screenshot.
When this line is commented, all looks fine (also on screenshot)
Sorry, can't find where to add screenshot, this is code
/////////////////////////////
public class Main extends Application {
final int W = 400;
final int H = 300;
@Override
public void start(Stage primaryStage) throws Exception{
primaryStage.setTitle("Hello World");
StackPane root = new StackPane();
Canvas canvas = new Canvas(W, H);
root.getChildren().addAll(canvas);
GraphicsContext graphicsContext = canvas.getGraphicsContext2D();
graphicsContext.setFill(Color.BLACK);
graphicsContext.fillRect(0, 0, W, H);
primaryStage.setScene(new Scene(root, W, H));
primaryStage.setResizable(false);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
////////////////////////////
- duplicates
-
JDK-8096889 Initial stage size set incorrectly for non-resizable stages
- Closed