But when I run the code with dlg defined as JPanel it prints the message before I close the JPanel.
Expand|Select|Wrap|Line Numbers
- jmnuTest.addActionListener(
- new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- jmnuTest_actionPerformed(e);
- }
- });
Expand|Select|Wrap|Line Numbers
- private void jmnuTest_actionPerformed(ActionEvent e)
- {
- Testwhen dlg = new Testwhen(this);
- System.out.println("I'm here");
- }
And I need the JPanel to behave like the JDialog in that sense.. how could I deal with this?
Thanks in advance