• Post Reply Bookmark Topic Watch Topic
  • New Topic

Minimum Grid in GridBagLayout

 
Emil Karlsson
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Are there any methods to set a minimum number of rows and cols in GRidBagLayout?
/Emil
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your requirement?
 
jrookie
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
in gridBagLayout you use GridBagConstraints
so ... when you need make new row
just use field GridBagConstraints.REMAINDER
if you don't use it all your components will locate ONE row and number of columns will equal your number of components
 
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!