This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
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