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

problems with groupLayout  RSS feed

 
Ben Hultin
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a groupLayout inside a JTabbedPane and while I am not getting errors during the development at runtime I am getting a whole slew of them.

Below is the I am using for the groupLayout






When I check the errors it takes me to a Container.java file which has about 4600 lines of code in it.

A few of the errors I am getting is:

1) Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: adding container's parent to itself

2) Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: javax.swing.JButton is not attached to a vertical group
the 2cd one is mentioned alot which I would imagine is refering to the JButtons in the vertical group, just dont know how it could be.

I appreciate any help on this


 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GroupLayout was not created to be manipulated easily by humans but rather by code-generating software. If possible, I recommend use one of (or several of) the more human-friendly layout managers.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Pete

Why don't you use MigLayout? I've used it once and I like it. It's also easy to learn.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!