This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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
 
GeeCON Prague 2014
 
subject: get all application components and change their orientation