Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / June 2005

Tip: Looking for answers? Try searching our database.

JSpinner buttons on left instead of right

Thread view: 
ChooChooOnMyHead - 17 Jun 2005 16:00 GMT
I have a JSpinner and want the buttons to be on the left,  not the
right.  Is there a setting for this or will I have build my own
JSpinner to accomplish it?  Thanks
~Doktor
Andrew Thompson - 17 Jun 2005 16:33 GMT
> I have a JSpinner and want the buttons to be on the left,  not the
> right.

Use a mirror.    [ ;-) ]

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

ChooChooOnMyHead - 17 Jun 2005 17:31 GMT
hahaha.  as long as i don't put the mirror in a case and then break it
and get 7 years bad luck that'll be ok.   thanks for the solution
Fritsch,  all set.  
~Doktor
Thomas Fritsch - 17 Jun 2005 17:09 GMT
> I have a JSpinner and want the buttons to be on the left,  not the
> right.  Is there a setting for this or will I have build my own
> JSpinner to accomplish it?  Thanks
> ~Doktor

To set the orientation of your single JSpinner:
yourSpinner.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

or may be, if you want to set the orientation of your entire GUI:
yourFrame.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

These methods are described in
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html

Signature

"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

Pete Barrett - 17 Jun 2005 18:55 GMT
>> I have a JSpinner and want the buttons to be on the left,  not the
>> right.  Is there a setting for this or will I have build my own
[quoted text clipped - 9 lines]
>These methods are described in
>http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html

I'm not sure this is what he wants. If I understand him, he wants
normal text direction (ie. right to left or left to right, depending
on locale), but with the arrow buttons on the left instead of the
right of the editor. Won't setting the ComponentOrientation to
RIGHT_TO_LEFT set the text running right to left as well (I've never
used it myself)?

As an alternative, he could probably write his own LayoutManager for
the JSpinner - the code's available, and it would only need trivial
changes to put the buttons on the right instead of the left.

Pete Barrett


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.