GUI Design Problem

Hi folks,

I'm trying to put together a gui for a little tool I am working on. In fact I have made one, but I get the feeling it is not exactly well-designed, and I was wondering what the best approach was in this situation:

It should look like those installshield things we've all seen where there are 'Next' and 'Previous' buttons at the bottom, and you navigate through the application setting paths etc etc.

At the moment I have a JFrame with a CardLayout panel in the centre and a panel holding the 'Next' and 'Previous' buttons at the bottom.

I have added classes to the CardLayout panel, all of which extend an abstract class that extends JPanel and has methods 'performNextAction' and 'performPreviousAction'. So when the user clicks next, the currentPanel is instructed to execute the appropriate action, which always includes displaying another panel.

The problem I feel is that everything is coupled to everything else - I mean, if the user clicks 'Next' and there is a problem, (e.g. invalid option selected) then the currentPanel has to be able to tell the main panel what the problem is, etc etc

I experimented with a system of adding all the panel names to a collection, and retrieving the next or previous one when necessary, but I ran into problems when there were 'forks' in the path (when the choices on one panel affected which panel would be displayed next....

Sorry, it's a difficult thing to explain, but if anyone out there understands what I am talking about, I'd appreciate some help (blushes)

Thanks

[1600 byte] By [Segmentation_Fault_of_the_Soula] at [2007-10-1 20:57:42]
# 1
Use JDICJDesktop Integration ComponentsThis has components to build what you are wanting.https://jdic.dev.java.net/
pazhanikanthana at 2007-7-13 2:54:36 > top of Java-index,Other Topics,Patterns & OO Design...