How to hide a JFrame when a JDialog class is open

I am tring to Hide a JFrame when a JDialog box opened, please how doi do this usuing the addActionListener();

Answers


When you create a JDialog you should be specifying the JFrame as the owner of the dialog, then you can use the getOwner() method of the dialog to get the frame reference at any time.

In you JDialog you should be able to use a WindowListener.

  1. In the windowOpened event you hide the frame
  2. in the windowClosed event you show the frame.

Need Your Help

grunt-usemin: Defining custom flow

javascript gruntjs yeoman grunt-usemin

I am using grunt-usemin plugin. I wonder how to do below.

extjs sortable does not sort on case and dates

javascript extjs2

I have a extjs grid which has an email field, that has emails beginning with upper case and lower case. This field does not sort as it should.