Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Query on Internal Window??  RSS feed

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all friends,
iam facing with one problem i want to open another class in new window from one swing Interface on action event of button.First I tried it with below code:-
Report.addActionListener (new ActionListener () {
public void actionPerformed (ActionEvent ev) {
SimpleTable table = new SimpleTable();
table.setVisible(true);
table.setSize(new Dimension(300, 200));
table.setLocation(200,100);
}
});
But when i close my child window(means SimpleTable class) it also closes its parent window.After that i tried it with JInternal Frame class but couldn't slove my problem.Can any one plz guide me how i Can slove my problem.
Regards
Bikash
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like SimpleTable's exit listener is calling System.exit()... either through a WindowListener, or by setting default close operation to EXIT_ON_CLOSE.

You need to change it to only dispose of the window and not exit the JVM...
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nate,
Lot of thanks for ur help.U r absolutely right.
Regards & Thanks
Bikash
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!