This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
I have added a MouseDoubleClick AtionListener to an Image. On doubleClick it will open a popup Menu. This popup menu contains a button. I included one more actionListener for this button and With in ActionPerformed method,for button, I am creating one JInternalFrame. On this JInternalFrame I am adding a paintComponent method by using the following statement -
myIntFrame_new.getContentPane().add(new JScrollPane(new CreateGraph())); // CreateGraph is a class which contains paintComponent method
My problm is when I'm double clicking over image more than one time it is creating that many number of JInternalFrames.
( eg.- Image -> doubleClicked[3rd time] -> One popup Menu -> On clicking over popup menu button -> 3 JInternalFrames )