Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Panels and panels

 
Anna Hays
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am wondering if having too many panels to make the desire look on the front end is bad? I know nested HTML table is bad, what about nesting panels in Swing? I have left my assignment for another few months now avoiding Swing. Does anybody know some good links on good practices on Swing? Not just how to use it.

Huge thanks!!

*Swingphobia*
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nested panels are a good thing. To some degree you are expected to leverage nested panels for complex GUIs. But more importantly, if you're clever you can separate functionality, or easily reuse a nested panel, either by using methods or extended classes:

Here's a contrived example:


Now this application (at least, mine) isn't really that big to warrant something like that, BUT, it is useful to have something like this:



That and some good documentation should (once again, I suspect) get you points for code clarity.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic