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 JPopupMenu issue with windows 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 "JPopupMenu issue with windows " Watch "JPopupMenu issue with windows " New topic
Author

JPopupMenu issue with windows

curtis ashby
Greenhorn

Joined: Sep 28, 2008
Posts: 14
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

Joined: Jul 26, 2007
Posts: 9990
    
    7

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
curtis ashby
Greenhorn

Joined: Sep 28, 2008
Posts: 14
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? >
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPopupMenu issue with windows
 
Similar Threads
undoProblem
painting problems using JmenuBar
Problem while working with JPopupMenu
KeyBoard events not listening in JPopupMenu
Combine two different JPopupmenu