• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to create horizontal menus

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all,
Iam creting menu driven program in which i want horizontal menus
for ex:Instead of
File Edit View

i want

File
Edit
View

in this fashion iam using border layout and also menubar for adding menus
please can anyone help me .
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vin Hari:

i want

File
Edit
View.



Instead of adding the Edit and View menu to the JMenuBar, add them to the File Menu, and add only the File Menu to the JMenuBar.
 
vin Hari
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Thank you for reply,i got it anyhow,
my new question is i want to separate the menu with separators
which iam not getting means
File
------
edit
-----

like this if iam using filemenu.addSeparator() it is for separating menuitems not menus if iam using menubar.addSeparator() it showing error, and also i want to give different colors for menu means a file menu with different color and edit with different in order to differentiate them what to do please help me.
[ October 14, 2007: Message edited by: vin Hari ]
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this :

Is this what you want to do? If not can you post your code so I can try to figure out whats going on?
 
vin Hari
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
Thank you for reply ,it is working ,but my problem still for the separators for menus iam using vertical menu bar hence my menu looks
File
Edit
View
but iwant to sepatate them with separators if iam using filemenu.addSeparator() it for separating the menuitems in the filemenu
if i use menubar.addSeparator() it is error ,please tell me how to separate these menus please help me.thanks in advance.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic