Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problm with JInternalFrame and MouseDouble Click  RSS feed

Prakhar Singhal
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!