File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 318
    
    2
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: 36478
    
  16
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
 
Similar Threads
Addind with javascript
smtp server name while using jmail
JPopupMenu on a JTable Header Selection Problem
Addind a word in the String
Jtree and Popup Menu