This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes get all application components and change their orientation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "get all application components and change their orientation" Watch "get all application components and change their orientation" New topic
Author

get all application components and change their orientation

Tizki Ko
Greenhorn

Joined: Apr 17, 2010
Posts: 6
hi,

i m trying to make a RTL version of an existing software.
i wonder what is the most efficient way to change all GUI component's orientation to RIGHT_TO_LEFT?
is it possible to code a function that would search all my source code file for Components, and when found, change their orientation?

Thanks,
Tizki
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
a recursive function should do it
pass the frame's getComponents() to the method
set each component RTL
check if component instance of Container
if so, pass its getComponents() to the method
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: get all application components and change their orientation
 
Similar Threads
Disadvanteges of android:configChanges="orientation|keyboardHidden"
Print in LANDSCAPE orientation ????
BeanInfo - HORIZONTAL and VERTICAL instead of 0 and 1
Change the Printer Orientation??
Cell size in JList