Parent window goes back on closeing the model dialog

Hi,
I have application which will show the model dialog in the middle of the operation. In that, once I close the model dialog the main application is going back to other applications opened in my machine.
My Sample Code
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
public class ABCDEF extends JFrame implements ActionListener
private JButton btnStart;
private JButton btnExit;
public ABCDEF ()
super ();
setLayout (null);
setDefaultCloseOperation (JDialog.DISPOSE_ON_CLOSE);
btnStart = new JButton ("Start");
btnStart.setBounds (10, 10, 100, 20);
getContentPane ().add (btnStart);
btnStart.setActionCommand ("Start");
btnStart.addActionListener (this);
btnExit = new JButton ("Exit");
btnExit.setBounds (10, 90, 100, 20);
getContentPane ().add (btnExit);
btnExit.setActionCommand ("Exit");
btnExit.addActionListener (this);
setTitle ("Javav6.0 Test");
setSize (150, 180);
setVisible (true);
public void actionPerformed (ActionEvent e)
String sActionCommand;
sActionCommand = e.getActionCommand ();
if (sActionCommand.equals ("Start"))
setEnabled (false);
// Perform some operation
new MyDialog (this);
// Perform rest of the operation
else if (sActionCommand.equals ("Exit"))
this.dispose ();
public static void main (String[] args)
new ABCDEF();
class MyDialog extends JDialog implements ActionListener
private JButton btnOK;
public MyDialog (JFrame theParent)
super (theParent, true);
setTitle ("This is Test Dialog");
btnOK = new JButton ("OK");
btnOK.addActionListener (this);
add (btnOK);
setSize (100, 200);
setVisible (true);
public void actionPerformed (ActionEvent e)
this.dispose ();
}Basically, I want the main application need to be disabled till the selected operation completes.
This is used work good in Java 1.5.0.4. Now I have above stated problem in JDK 1.6.0.10
Please help to resolve this issue.
Thanks in Advance.
S Prabhu

Can you please tell me is there any other alternate option.
Since I load the different dialog based on user input and so.
The same dialog may be loaded with different parent windows.don't disable the frame(s) - just make the dialog modal

Similar Messages

  • Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.

    Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.  Is there some way I can open the contact list, click on all of the individual addresses to which I want to send the email without the list closing between each address entry, and have all of my address entries be listed to the email at one time?  Something like it works in Gmail.  I do not want to use set lists, I want to enter different addresses each time I send an email.  And I am a very slow typist, so I don't want to type the first few letters of each recipient's name.  It is much faster for me to just click on the e-mail addresses in the list as a group.  It doesn't make any sense to me to have to reopen the contact list for each address, when it should be so easy to click on all of the addresses I want at one time and then click once to add them all to the email as a group.  If there is a solution to this, please tell me.  Thanks.

    Vatlily,
    Try this:
    1. Select Mail>File>New Message.
    2. Select Mail>Window>Address Panel.
    3. Use (command+click) on the desired addressees in the Address Panel to create the list.
    4. Click "To:" on the top left of the Address Panel.
    The group that you selected will be added to the "To" field in your New Message.

  • Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?

    Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?  The cut and paste function is not available and there's no "move to" function.  Am I missing something?  It was so easy with Windows.

    Drag the files, or press Option when pasting them; this accesses the Move To function.
    (124070)

  • Hi there, when i press the start button on my G4 twin processor, the light inside the button comes on until I let go when it goes back off and the machine does not start up. Any ideas?

    Hi there, when i press the start button on my G4 twin processor, the light inside the button comes on until I let go when it goes back off and the machine does not start up. Any ideas?

    Sounds a bit like the Power Supply, but...
    If you don't know the model, find the Serial# & use it on one of these sites, but don't post the Serial# here...
    http://www.chipmunk.nl/klantenservice/applemodel.html
    http://www.appleserialnumberinfo.com/Desktop/index.php
    How to find the serial number of your Apple hardware product...
    http://support.apple.com/kb/HT1349
    How to reset the SMU/PMU on a Power Mac earlier G3, G4, G5 models...
    http://support.apple.com/kb/HT1939

  • So my iTunes Radio is not working and whenever I press or choose a station, it goes into the song it was going to play and goes back out to the stations menu. I have great wifi, great cellular option or whatever it it, So how do I get it to work again?

    So my iTunes Radio is not working and whenever I press or choose a station, it goes into the song it was going to play and goes back out to the stations menu. I have great wifi, great cellular option or whatever it it, So how do I get it to work again?

    Hi Jbierrie,
    There is an issue with Photoshop specifically related to recent updates in which causes the licensing to revert to trial after a certain number of launches (typically 2-3).
    The current workarounds are to either:
    - Sign in with your Adobe ID again every few launches
    - Uninstall Photoshop CS6 and then reinstall it but don't install any of the updates
    The issue with the updates is planned to be fixed in the coming weeks. Sorry for the inconvenience.
    -Dave

  • Whenever i play something or do something in mozilla, it automaticly goes back to homepage. the problem is with other browsers too? Could anybody help.

    Whenever i play something or do something in mozilla, it automaticly goes back to homepage. the problem is with other browsers too. It is very annoying . It does it randomly

    Do you mean that Firefox closes and restarts automatically?
    If you have submitted crash reports then please post the IDs of one or more recent crash reports that have a "bp-" prefix:
    *bp-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    *You can open the <b>about:crashes</b> page via the location bar, like you open a website, or open the crash reports page via "Help > Troubleshooting Information".
    See:
    *http://kb.mozillazine.org/Mozilla_Crash_Reporter
    *https://support.mozilla.org/kb/Mozilla+Crash+Reporter

  • Trying to order calendar ..but each time it says that I must verify address..but then it goes back to reassembling the calendar and then saying I must verify my address

    Made calendar..when I try to purchase..it puts together the calendar but then says that I need toi verify my account information...but if I try to do anything...it just goes back and assembles the calendar again and then says that I need to verify my account information,

    Go to the Apple store (store.apple.com) and re-emter (not just verify)all of your information,
    Before ordering your book preview it using this method - http://support.apple.com/kb/HT1040 - and save the resulting PDF for reference - the delivered book will match it.
    and if the preview is fine order
    LN

  • Update 4.01 asks to update, I say yes it appears to update then in the last step it goes back up to the update center and cannot connect, the update does not take effect and it keeps asking

    I allow update 4.01 to update got thru all the steps and at the last step it goes back out to the update and cannot connect, the update does not take effect.

    Sign out of your account on the iPad, restart the iPad and then sign back into your account.
    Settinsg>Store>Apple ID - tap the ID and sign out.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    After restarting go to Settings>Store and sign in again.

  • Bought Garageband for iPad1 and it worked like a dream. Then I upgraded my system to 4.3 and now Garageband doesn't work. How come? When I try to start it just flickers and then goes back to show the symbol for the app.

    Bought Garageband for iPad1 and it worked like a dream. Then I upgraded my system to 4.3.5 and now Garageband doesn't work. How come? When I try to start it just flickers and then goes back to show the symbol for the app.

    I understood what you were saying. You did type 4.3.5 in your post. Several other things to try.
    Close all open apps like I described above. Just tap the home button first so that you will be able to access all of your apps. Close every single one and then restart again.
    You can also delete the app and download it again. As long as you use the same Apple ID and password there is no charge to download it again. Tap and hold down on the GarageBand app icon until it wiggles. Then tap the X to delete it. Download it again.
    Reset the iPad. Hold down on the sleep and home buttons at the same time until the Apple logo appears on the screen. It takes about 10-15 seconds. Ignore the red slider shut off bar. When the Apple logo appears you can let go of the buttons and the iPad will reboot.
    The final thing to try is to download another app - any free app. Sometimes that seems to reset something on the iPad. You can always delete the free app if you don't want it.

  • Mx.core.Window - prevent user from closing the window?

    Hi,
    mx.core.Window has properties 'maximizable' &
    'minimizable', but there doesn't seem to be any 'closable'
    property. In my application I'm creating another window (apart from
    the main application window) that needs to be open the whole time
    the application is running. If I can't prevent the user from
    closing the window, then I'll have to rig up some code to
    automatically re-open it if the user closes it. I'm hoping there's
    a way to prevent the user from closing the window in the first
    place though.
    I'll much appreciate any ideas - thanks :)

    Listen for the window's closing event and call
    preventDefault().

  • Why can't I install free apps it just keeps going back to get the app

    I can't  Install a app it doesn't go through it asks for my password and when I put it in it goes straight back to get the app and I don't know why it's doing this can someone help me first

    Restart is the universal cure
    http://support.apple.com/kb/ht1430

  • New window goes back when i click on the link

    Hello guys.
    i recently face the new problem in IE.
    at first when i click on the hyperlink the new window opens fine.
    but when i close the windows and try open them again, all new windows open in the back!!
    its really wired!!
    i test this in Windows xp. seven and 8. in IE 8, 9 and 11.
    i really appreciate any kind of help.

    new windows open in the back!!
    There is an option for that.  Try pressing Ctrl+Shift- when clicking on a link (Or just Shift- and click.  I think it depends on your Tab settings. 
    Always switch to new tabs when they are created.  E.g. background tab or background window, same effect.
    Good luck
    Robert Aldwinckle

  • The latest version of firefox makes my screen view smaller. I do not like this. The toolbar has changed to a way I do not like it. Help me fix this or I'm going back to use the microsoft explorer, and I haven't used that in years.

    Regarding this latest edition of firefox: How do I fix the top of my mozilla firefox browser so there is not 1.25 inches of my screen a wasted dead space at the top? How do I move the 'home' button back to the left side?

    Thanks but you're only telling me stuff I already know, that dosen't explain how I get the new version of Firefox to look neat and tidy like it always used to. I can no longer have all my icons that I use, I can no longer access things as easily as I could and the whole thing looks very bare and basic now! A bigger mess than even Google Chrome.
    I've spent most of this evening trying to get stuff back that is now lost because of this 'upgrade' and I'm now giving up with it. Well done! You've totally ruined what was the best browser for years.

  • Firefox won't start after upgrade, it appears on the windows task manager but closing the firefox.exe doesn't help

    I upgraded to firefox 4 and it asked me to restart the system, since then it stopped working. it just won't open. I have windows xp and when I click on the firefox icon I see firefox.exe in the windows task manager under 'processes' I tried ending the task but it wont help. i also tried removing and reinstalling.. didn't help either :( I also checked if Kaspersky might be blocking it but it isn't

    The only thing that worked for me was installing an older version (3.6) and it started working fine... I dont even want to try upgrading it to 4 again..

  • Firefox will not open in windows 7 , i have closed the prossess and tryed to restart it but same thing, it will not start.

    fresh in stall of windows 7 home pre. this has happen before and i never fingered it out. this is windows 7 , 32 bit not 64 bit. i try to launch Firefox 4, or earlier version and nothing happens.

    you may encounter this when firefox is updating, especially auto-update after one restart of firefox.
    well, best solution for now is , wait wait and wait, it is quite long.
    or remove firefox and download the lastest version of firefox install pack from mozilla official, then install it. then world in peace.

Maybe you are looking for