2

How to get full size of height on the window pop-up in javafx. I have a fxml layout design by sceneBuilder with Height of the pop-up window is 147. when the pop-up show on the pop-up have a title bar of Window. my problem how to get full height include the title bar. thank everybody for help.

vxba
  • 69
  • 1
  • 1
  • 6
  • 3
    [`Window.getHeight()`](http://docs.oracle.com/javase/8/javafx/api/javafx/stage/Window.html#getHeight--) gives you the height of the window, including the title bar. – James_D Aug 18 '15 at 00:46
  • 1
    thank you, i tried and successful! – vxba Aug 18 '15 at 04:32

1 Answers1

1

As James said, window.getHeight() gives the height of total window (title_bar + content).

In addition, remember, if your Stage has used stage.initStyle(StageStyle.TRANSPARENT) method, then, you shall have to use scene.getHeight() which will give the height of the content. As transparent window doesn't have a titlebar, height of the scene will be the height of the window then.

Muzib
  • 2,412
  • 3
  • 21
  • 32