Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JPopupMenu issue with windows

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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? >
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic