Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jdialog & Title

 
Ash Kondhalkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are developing an multilingual application and we need to apply Right to Left orientation depending upon user language preference.

I am facing an problem with the Title of the Jdialog. Even after applying Right to left orientation to Jdialog using setComponentOrientation, the title is still appearing on the left top corner.

Kindly let me know if there is any solution to this.

Cheers
Ashwin
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I remember correctly, the dialog title is actually rendered by the operating system, not by Java. You might simply be out of luck here, though I'd love to be corrected on this one.
 
Ash Kondhalkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply. But I am not sure how it is working fine for JInternalFrame?? But then it doesn't work for JFrame also.
 
Kirill Grouchnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the following two:
1. Decorated / undecorated mode of your JFrame (setDefaultLookAndFeelDecorated, isUndecorated)
2. Look and feel that you're using

If your frames are not decorated (by default they are not), then you get the title pane from OS. If OS doesn't support proper RTL painting, or Java doesn't set it right on the native window, then you're out of luck.

If your frames are decorated, then the title pane is painted by the current LAF (some LAFs do not support decorated mode, such as WindowsLookAndFeel). In this case you should ask the developers of the specific LAF if it supports RTL titles or not.

Kirill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!