Results 1 to 2 of 2
Thread: MessageDialog within a Dialog
- 04-14-2009, 10:52 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
MessageDialog within a Dialog
hi. pls a bit of help:
I have a messagedialog pop up from within another Dialog. Nice, but when OK is pressed in this new messagedialog, the original Dialog dissapears and focus goes to the main window (frame). How can I make it return to the initial Dialog?
Java Code:public JView(SingleFrameApplication app){ (...) jMyDialog = new javax.swing.JDialog();// frame JView has jMyDialog pop up and user make some choices (...) jMyDialog.addComponent(jButtonDiagConfirme);//jMyDialog has a button jButtonDiagConfirme to confirme the choices void SomeMethod(){ jMyDialog.setVisible()//pop up jMyDialog } //when jButtonDiagConfirme is pressed in jMyDialog another dialog pops up private void jButtonDiagConfirmeActionPerformed(java.awt.event.ActionEvent evt){ (...) if (someCondition<0) {JOptionPane.showMessageDialog(frame, "You made wrong choices, return to jMyDialog");}//this is the dialog "within" the jMyDialog } }
- 04-14-2009, 12:48 PM #2
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
InputDialog & MessageDialog HELP?!
By Frög in forum New To JavaReplies: 7Last Post: 02-26-2009, 05:41 AM -
JFace's MessageDialog Demonstration
By Java Tip in forum SWTReplies: 0Last Post: 07-07-2008, 04:39 PM -
Example of SWT Dialog
By Java Tip in forum Java TipReplies: 0Last Post: 01-09-2008, 12:01 PM -
Dialog Box
By uncopywritable in forum New To JavaReplies: 2Last Post: 07-30-2007, 12:42 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks