Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

design advice  RSS feed

 
Bill Goldsworthy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm working on an application and the GUI will take on a similar look & feel to a web browser - a window with a menu, toolbar buttons and then a big content window.

Anyways, the way I've gone about it is this: a JFrame class called RootView which has all of the common GUI (like the toolbar) and manages all of the content classes which plug into my 'content panel'.

So RootView's strucuture is:



Then I have a class, like HomeView for example, that extends JPanel.

I have all of my JPanel content classes stored in RootView in an ArrayList and I have an indexing Enum. So the idea is when the user clicks a toolbar button such as 'Customers' it would:



Is swapping in/out JPanel objects like this a good approach for this? Any suggestions? The content JPanel classes could end up being fairly complex so I wanted to have each in it's own seperate class.

Thanks in advance,
Bill

[ February 04, 2005: Message edited by: William Goldsworthy ]
[ February 04, 2005: Message edited by: William Goldsworthy ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!