• Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout Issues

 
Stephanie Challand
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having layout issues on the Mac. The program looks as expected on the PC where it was developed, but on the Mac there are cutoff labels, fields not being shown because I am assuming they are off the screen despite the fact there looks like enough room, etc. What are the tips and tricks to fix such issues in Java?
 
Knute Snortum
Sheriff
Posts: 3277
84
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using Swing or JavaFX? If you TellTheDetails (← that's a link) I should be able at least to put this question into the best forum to get an answer.
 
Stephanie Challand
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swing. Sorry, I am not a Java guru. Thanks!!
 
Stephanie Challand
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I figured it out. I set a preferred size on the nested panels and now it displays better on the Mac too.
 
Rob Camick
Ranch Hand
Posts: 2701
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I set a preferred size on the nested panels


Don't set the preferred size. That is the job of the layout manager.

Read the Swing tutorial on Layout Managers for more information and working examples.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!