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 ]
Increasingly, people seem to misinterpret complexity as sophistication, which is baffling - the incomprehensible should cause suspicion rather than admiration. Possibly this trend results from a mistaken belief that using a somewhat mysterious device confers an aura of power on the user. Niklaus Wirth