User Settings JDialog

Hi,

I have a jdialog in cardlayout which acts as a user settings frame for my main application. On each of the panels is some user settings function (general, file settings etc.). On each of these panels i have action listeners to handle the events that relate to each section. All this works fine but what i would really like is to have 3 'master' ok, cancel and apply buttons to approve all the actions the user has made. This approach is more in keeping with how most applications behave. I have no idea how to begin on this, i would think some kind of pending actions list would be needed which would enable the apply and ok buttons once there is actions waiting but Im not sure how to pass these actions from the individual panel buttons. Any help, advice or sample code would be greatly appreciated.

Thanks and best wishes,

Steven

[866 byte] By [java_stea] at [2007-11-27 10:45:45]
# 1

I'm not 100% sure of your setup but what if you removed the action listeners from your panels and only add them to the buttons. When the user clicks on a particular button it fires off an event that performs all the appropriate actions you previously had assigned to the panels.

floundera at 2007-7-28 20:14:49 > top of Java-index,Java Essentials,Java Programming...
# 2

Hi, Thanks for your response.

Please see the below link.

http://www.codeproject.com/java/joptionsdialog.asp

What i need to do is create something like this with an ok / cancel / apply button however the difference is that the body pane of the example is just a simple panel. what i need is a cardlayout and a change made to any of the cards must filter through to the option pane and as such enable / disable the correct buttons and gather the actions needed. Is there any way i can achieve this? any help or example code would be greatly appreciated.

Thanks and best wishes

Steven

java_stea at 2007-7-28 20:14:49 > top of Java-index,Java Essentials,Java Programming...