• Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBagConstraints Problem  RSS feed

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel like I have tried everything and my panel still is not lining up the components right. The first component is placed where it is supposed to be (at the very top), but the second component is still showing centered in the panel instead of right under the first component. Here is the code:



Any help is appreciated.
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are asking how to position Search under Issue Tasks with only the insets spacing between them. The weighty constraint will allow components to disperse vertically when set to non–zero. One technique is to leave weighty set to zero to keep the components clumped together and then set it to non–zero for the last component to push them all up.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!