Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2007, 01:13 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
How to make the menu bar objects appears from right to left
I want to make the menu bar objects appears from right to left. The default behavior is from left to right. Anybody knows how to change this behavior?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-19-2007, 01:16 PM
Super Moderator
 
Join Date: Apr 2007
Posts: 30
johnt is on a distinguished road
Call following method of your menubar:

Code:
menubar.setLayout(new FlowLayout(FlowLayout.RIGHT));
and add the menu items backwards. If normal is File, Edit, Help, add them as Help, Edit, File. It should work.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-19-2007, 01:16 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Thank you. It worked!
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-19-2007, 12:12 PM
Member
 
Join Date: Jul 2007
Posts: 9
vata2999 is on a distinguished road
Also you can use ComponentOrientation
JPanel jContentPane;

jContentPane.setComponentOrientation(ComponentOrie ntation.Right_TO_LEFT)

for more information :
Using Layout Managers (The Java™ Tutorials > Creating a GUI with JFC/Swing > Laying Out Components Within a Container)

Last edited by vata2999 : 07-19-2007 at 12:14 PM. Reason: Add a link
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create Popup Menu with Sub Menu while right-clicking the JTree Node?? Kabiraa AWT / Swing 7 05-09-2008 08:54 AM
menu in top left always sschwinghammer New To Java 2 02-06-2008 03:39 PM
want to make a menu bar for image processing vidhi Java 2D 1 01-15-2008 08:12 PM
Using SWT Menu Java Tip Java Tips 0 01-09-2008 01:04 PM
Alert box showing time left hasansheikh18 JavaServer Pages (JSP) and JSTL 0 11-19-2007 09:56 AM


All times are GMT +3. The time now is 12:25 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org