• Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout  RSS feed

 
Andrew Lit
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'd like to know what should i change that elements in that panel would be displayed one above another not in queue.
Thank you in advance.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A GridLayout with 1 column would work. GridBagLayout would work. A vertical BoxLayout would work.
You might want to put a little bit more information so the appropriate Layout can be determined.
 
Andrew Lit
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to change th size of columns in GridLayout?
Because i want that label would be in the left part and the textfield would take up the least of the space.
thanks
 
jrookie
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use GridBagLayout becouse it's haven't limit for cells
if use GridLayout you must define how many rows and cols
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"jrookie" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Thanks! and welcome to the JavaRanch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!