Search:

Type: Posts; User: copeg

Search: Search took 0.22 seconds.

  1. Replies
    4
    Views
    17,030

    Re: close JDialog on button click

    Something like this....


    JFrame frame = new JFrame();
    MyPanel panel = new MyPanel(frame);
    JButton close = new JButton(""Close);
    close.addActionListener(pane);
    panel.add(close);...
  2. Replies
    4
    Views
    17,030

    Re: close JDialog on button click

    A few ways to do this...a) pass a reference of the JFrame to the Panel and make the appropriate calls b) Using SwingUtilities.getWindowAncestor to retrieve the parent window and make the appropriate...
Results 1 to 2 of 3