This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Try this line after you define dialog as the JDialog: dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE );
Joined: Jul 20, 2001
Thanks a lot Jennifer for your response, i have tried that option but unfortunately the line of code you suggested only removes the functionality of the button, i am looking forward to something like making the button GRAYED in color (Like you see it in windows, a grayeed disabled button .....) Waiting for your response.