• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

design advice

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic