Java Mac Menu System

I developed one Java Jframe application for Mac. I used

System.setProperty("com.apple.macos.useScreenMenuBar","true")

command to load the menu as Mac System menu. Its working , ...but while running the application i made some menus to be hidden/visible......................by this time i got a error like this




ava -Dapple.laf.useScreenMenuBar=true MyMenu
2004-10-15 14:19:24.681 java[376] Java couldn't paint in Java_apple_awt_CRenderer_doRect, no focused view.
Menu item[Undo[pressed!
apple.awt.EventQueueExceptionHandler Caught Throwable :
java.lang.NullPointerException
at apple.laf.ScreenMenu.setVisible(ScreenMenu.java:256)
at apple.laf.ScreenMenu.componentShown(ScreenMenu.java:238)
at java.awt.Component.processComponentEvent(Component.java:4957)
at java.awt.Component.processEvent(Component.java:4905)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


How can i solve this ?

Thanks in advance

Joe

Please sign in to leave a comment.