aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Right Click Option in JtextPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Right Click Option in JtextPane" Watch "Right Click Option in JtextPane" New topic
Author

Right Click Option in JtextPane

Siddique Ansari
Greenhorn

Joined: May 11, 2013
Posts: 21
I want to get options "Add to Name".. etc.. and am getting that.. but my problem is when I right click first then it show all MenuItems once, When I right click Again it shows all the options twice, when I right click again then it shows thrice. Tell me whats the problem?


Piet Souris
Ranch Hand

Joined: Mar 08, 2009
Posts: 700
    
  11
Hi Siddique,

well, have a look at line 17. You add an item to a menu. But suppose that item was already present in that menu (say, from a former right mouse click)?

Greetings,
Piet
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
And welcome to the Ranch
Siddique Ansari
Greenhorn

Joined: May 11, 2013
Posts: 21
THANKS....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Right Click Option in JtextPane