• Post Reply Bookmark Topic Watch Topic
  • New Topic

Right click de-selects text selection, on mac

 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a component that extends JTextField. It uses a mouselistener to show a context menu on a right click. The context menu has commands like "cut, copy, paste", all of which have logic based on the selected text. This works fine on windows, but on mac, the right click de-selects the selected text. Anyone know of a workaround?

*note, the text is deselected on a right click even if i replace my logic with:

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you display your context menu, are you using isPopupTrigger? Or have you used the setComponentPopupMenu ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!