This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBag Layout Problem  RSS feed

 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently creating an application that uses nested layouts to create a complex input form. So far everyting has functioned as expected until now. I post an image of what is occuring
and here is the excerpt of code producing the strange behaviour


I hope you understand my query. I can post more code or screenshot if necessary.

regards
Nigel
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why it's not working for you, not a GridbagLayout guru. I might suggest trying JGoodies forms if you can. You can download the library here. It took less time for me on one project to change everything to the JGoodies forms than it would have taken me to fix the GBL problems I was having, and I ended up happier with the GUI when I was done.
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To clarify further the setGbc method has the following argument list
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved it I forgot to add the GridBagConstraints when added the panel.
:roll:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!