Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPopupMenu issue with windows

 
curtis ashby
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I'm a long time reader but i haven't done much posting and i'm having the most strange issue with popup menus.

So I have built a test project called "Launch Pad" and i have versions for both Mac os x and Windows. Recently I implemented a cut/copy/paste architecture to the project for the search & data text fields in the GUI. Well it works perfectly in Mac but windows does not behave properly. Here is some code for my popup menu implementation:



As i said the Mac version is fine but when using the windows version the menus only work on some of the fields and they do not properly highlight the text either. If anyone is interested in seeing the actual project running just let me know and I'll give you the source.

Thanks for any insight you may have!

Curveo
 
Maneesh Godbole
Saloon Keeper
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
curtis ashby wrote:Well it works perfectly in Mac but windows does not behave properly.


Always tell us the details
How is it expected to behave and how does it actually behave?

We have a separate forum dedicated to Swing and other UI stuff.
I will move this thread there for you. In future, please post in the proper forum. You stand a better chance of getting your problem sorted that way.
 
curtis ashby
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:
curtis ashby wrote:Well it works perfectly in Mac but windows does not behave properly.


Always tell us the details
How is it expected to behave and how does it actually behave?

We have a separate forum dedicated to Swing and other UI stuff.
I will move this thread there for you. In future, please post in the proper forum. You stand a better chance of getting your problem sorted that way.


Thanks Maneesh
Well actually the code above works as expected. After some trouble shooting i determined that the problem is in the objects referencing the cut/copy/paste class and that problem is still perplexing me so here is the jist of it: I'm adding the cut/copy/paste class to the MouseListener of various JTextFields and most of the fields properly handle the JPopupMenu correctly but there are exactly 4 fields that's MouseListener crashes after you either cut/copy/paste with a mouseclick. Also it may be worth mentioning that when using on a Mac the Edit & Help Menu's dissapear when you launch the preferences. anyway here's the code:



And then you have a class that constructs the preferences JDialog:



Any ideas? >
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic