Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMenuBar error.  RSS feed

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a JMenuBar with some JMenus.
How to set the helpmenu of a JMenuBar?
Error:exception in thread "main" java.lang.Error: setHelpMenu() not yet implemented.
at javax.swing.JMenuBar.setHelpMenu(unknown source)
code:
JMenuBar jmb=new JMenuBar();
JMenu jhelp=new JMenu("Help");
jmb.add(Menu1........ etc.
jmb.setHelpMenu(jhelp);
****end of code
Happy middling with java. :
Netharam.
 
John Smith
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the API documentation here, "this method is not yet implemented and will throw an exception".
I guess you have to add your help menu in a different way...
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the sun tutorial has a good example for just what u r looking for.
here is the link
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops!!!
terribly SORRY.
its late here and apperntly i need sleep!
that post was meant for another question .
sorry again.
as a side note, now that im here, u can try to use the MenuBar in the awt package instead of the JMenuBar in swing for that. (ofcourse only if u r willing to change your applictaion to awt instead of swing).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!