• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to put menu item in Title bar

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I have a problem with my GUI. Actually in Java generally we put menu & menu-items in menubar which is shown just below the Title bar ( in a JFrame )

But I want to put my Menu ( & further menu-item through pop-up or so) in Title bar so that I do not have to put the Menu-bar.

I am using swing version of Java GUI.....


Is there any way to do it.

Please help me out.........

Thanks,

Manoj
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This can't be done with pure Java. With JNI, anything is possible, but chances are you won't want to mess with that. I wouldn't want to.

Out of curiosity, why do you want a menu in the Title bar? This is something I have to say I have never seen.
 
Manoj Tyagi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Gregg,

I agree with you , it may make a mess. But actually I was simulating a GUI which was made in C++ (may be) & it was having Menu (Items) in Title bar.

Moreover, what happened with me. I have completed my whole GUI & in most of the cases I have used Null Layout. Initially there was no need for Menu options like File>Save, Help>About etc.

But now in the end there is a need for all this. I have no space to do it & also I do not what to disturb Null layout. Only space seems to be in Title bar only.

Thats why this idea came. Any way thanks for your suggestions....


Manoj
 
author & internet detective
Posts: 42163
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The menubar is separate from the rest of the layout, so it won't mess up the flow. It does take up space, so there is little you can do there.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic