Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set a minimum pane size - javafx

 
Carl Bernardi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to set a minimum size such as 200x200 so when my pane is resized it cannot be any smaller then the select minimum size. Anyone ideas?
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If setting the minimum width and height didn't work for you, you need to post a SSCCE that we can run and maybe suggest something.
 
Carl Bernardi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what SSCCE is but I guess it means code. I was getting a null error the way I reading some data from a file. Since it was tied to the size of the scene I thought a min size would fix the problem. Turns out I was just reading data at the wrong time. Thanks for the reply however.
 
Almalyn caguioa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this code:
Pane pane = new Pane();
pane.setMinSize(200, 200);
 
Carl Bernardi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic