Forums Register Login

Problm with JInternalFrame and MouseDouble Click

+Pie Number of slices to send: Send
Hi ppl,

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 )

How to fix this problem?
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1162 times.
Similar Threads
JInternalFrames and focus
JDesktopPane/JInternalFrame - question re: closing frames and repainting
Which JComponent should i use for this??
Closing one of several JInternalFrames
JInternalFrame JScrollPane JTextarea
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 09:16:53.