Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

change component orientation  RSS feed

 
Meghana Ghanekar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am trying to write code for a Calculator.In its GUI I want the textfield that accepts input as well as displays result to be oriented from right to left. I m not able to do this? setComponenetOrientation method of component class is not working. No error given. But no change in the orientation.Can u help me our?

Warm Regards,
Meghana
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing forum...
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean that you want the number entered aligned on the right? Or are you using a foreign language where you typically read from the right to the left? If the later, then setComponentOrientation() *might* be what you want, but apparently does not behave how you expect. If the former, you should use setHorizontalAlignment() instead.

Layne
[ October 24, 2005: Message edited by: Layne Lund ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!