New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

custom menu addition

Post Reply New Thread Subscribe

Thread Tools
Posts: n/a

Comment #1 (more below)
I attempted to add a new menu category "Tools" to an AWT Java application I was attempting to build from XCode's template, and while I'm getting compiler errors, the initial application does start up to a hello world state.

Thanks for any considerations. I am trying to figure this out before I add the methods and more code.
[Session started at 2006-07-16 16:15:47 -0700.]

appname1 has exited with status 0.
[Session started at 2006-07-16 17:33:44 -0700.]
[LaunchRunner Error] appname1.main(String[]) threw an exception:
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key toolMenu
at java.util.ResourceBundle.getObject(ResourceBundle. java:325)
at java.util.ResourceBundle.getString(ResourceBundle. java:285)
at appname1.addMenus(
at appname1.<init>(
at appname1.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(
at 88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner. java:50)
at apple.launcher.JavaApplicationLauncher.launch(Java

appname1 has exited with status 0.
[Session started at 2006-07-16 17:44:12 -0700.]

Comment #2
In order to get the code to compile I had to comment out the hotkeys for the custom menu items. And so I think that while Java handles "find" it will not handle the new ones, and so I think the problem is in "import java.util.ResourceBundle;" But I don't know where to find it or modify it...

cutAction = new cutActionClass( resbundle.getString("cutItem"),
KeyStroke.getKeyStroke(KeyEvent.VK_X, shortcutKeyMask) );
copyAction = new copyActionClass( resbundle.getString("copyItem"),
KeyStroke.getKeyStroke(KeyEvent.VK_C, shortcutKeyMask) );
findAction = new findActionClass( resbundle.getString("findItem"),
KeyStroke.getKeyStroke(KeyEvent.VK_F, shortcutKeyMask) );
nextAction = new nextActionClass( resbundle.getString("nextItem") );
// KeyStroke.getKeyStroke(KeyEvent.VK_G, shortcutKeyMask) );

sortAction = new sortActionClass( resbundle.getString("sortItem") );
// KeyStroke.getKeyStroke(KeyEvent.VK_A, shortcutKeyMask) );
mirrorAction = new mirrorActionClass( resbundle.getString("mirrorItem") );
// KeyStroke.getKeyStroke(KeyEvent.VK_M, shortcutKeyMask) );
rotateAction = new rotateActionClass( resbundle.getString("rotateItem") );
// KeyStroke.getKeyStroke(KeyEvent.VK_R, shortcutKeyMask) );
QUOTE Thanks

Post Reply New Thread Subscribe

« A vexing problem... | telnet in terminal »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Invisible Menu Bar Item roma0104 OS X - Operating System 2 06-02-2006 11:12 PM
Character Palette menu on the menu bar? juventusfc99 OS X - Operating System 3 04-29-2006 05:33 PM
Switched Off! SpecialSauce Switcher Hangout 21 06-08-2005 10:24 AM
Always Losing Input Menu Preferences fumomo OS X - Operating System 3 05-13-2004 07:32 AM
word 2001 menu bars jlarkin123 Running Windows (or anything else) on your Mac 3 11-18-2003 09:55 PM

All times are GMT -4. The time now is 10:43 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?