Re: How to pass back a value from a window
- From: "Jeff" <jeffrey.summers@xxxxxxxxx>
- Date: 26 Oct 2006 11:52:26 -0700
PJava wrote:
If you use JOptionPane.showInputDialog, it will pass back a string
value.
I have a JDialog window, but don't know how to pass back an object
after the window closed.
Please kindly give me some idea!
THANKS!!!
Assuming you have an OK button on your dialog that you are using to
close, in the event listener for the button use
myDialog.setVisible(false);
Then you can read the fields from the dialog, even though it is no
longer displayed, at any time. No need to pass the object, just read
it.
/js
.
- Follow-Ups:
- Re: How to pass back a value from a window
- From: PJava
- Re: How to pass back a value from a window
- References:
- How to pass back a value from a window
- From: PJava
- How to pass back a value from a window
- Prev by Date: Re: JTable cell editor question
- Next by Date: Algorithms for managing GUI windows
- Previous by thread: Re: How to pass back a value from a window
- Next by thread: Re: How to pass back a value from a window
- Index(es):