• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble with resizing app content

 
Petr Omáčka
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have trouble with resizing content of my JavaFX FXML app.


If app window is resized normally by dragging window edge the scene and stage are resized (I have checked this programatically) but the content does not.

Top level container is FlowPane. It is set as a scene root as Parent type.

FlowPane contatins: MenuBar, and TabPane with one tab. Tab contains AnchorPane and so on.

In SceneBuilder there is no option for FlowPane to be achored to app window edge.

Maybe it will be useful information that FXML loaded to FlowPane (this FlowPane is used for scene constructor) is resized but not seems to. If I wrap FlowPane to Group first it is not resized and of course not seems to.
 
Petr Omáčka
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:This doesn't sound like a Java8 question, so let's try the FX forum instead.


I thought that FXML belongs to Java 8 but it seems JavaFX will be better.
 
Petr Omáčka
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved by rearranging components into BorderPane as toplevel container.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!