View Single Post
  #2 (permalink)  
Old 07-07-2007, 02:51 PM
JavaBean's Avatar
JavaBean JavaBean is offline
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Quote:
you guys didnt helped me in my last post...
I guess you already found solution to that problem since you are using Netbeans GUI Builder.

Quote:
for instance i have a parent form and from parent form i press a button which opens a new form...So how to manage this functionality....
Design these forms separately. I guess the first one is a JFrame and the second one will be a JDialog.

Create a new JDialog form. (File -> New File -> Java GUI Forms -> JDialog Form). Design it just like you did for JFrame by drag and drop. And then from the mouseClicked event of your button in the first form, create a new instance of your JDialog and show it. Like this:

Code:
MyJDialog myDialog = new MyJDialog(this); myDialog.setVisible(true);
Hope this helps..
Reply With Quote