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
Dave-pv
Guest
 
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(appname1.java:203)
at appname1.<init>(appname1.java:62)
at appname1.main(appname1.java:335)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at apple.launcher.LaunchRunner.run(LaunchRunner.java: 88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner. java:50)
at apple.launcher.JavaApplicationLauncher.launch(Java ApplicationLauncher.java:52)

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

All times are GMT -4. The time now is 04:36 PM.

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

Welcome to Mac-Forums.com

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?