Re: Restricting multiple clicks on a component
Saturday, July 27, 2002 02:02 AM
Try declaring a public static variable(preferably boolean), and initialise it as 'false'. Before opening the inner JFrame just check for the value for 'false', and if yes, set the variable to 'true' and the window opens. Also reset the variable to 'false' when you dispose() the window through a button click as well as close the window by clicking 'X' option appears in the title bar. This can be done by adding a window listener for the inner frame and overriding the windowClosing() method. Hope this will solve your issue.