Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Right Click Option in JtextPane

 
Siddique Ansari
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 1368
29
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50196
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Siddique Ansari
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic