开发者

JDialog window controls component orientation (right-to-left)

I have a question about mirroring the JDialog window controls (ie the close sign 'X', the title and so on)

When I apply the right-to-left component orientation for a JDialog, it flips everything within apart from the window controls. I initially thought this is to do with the JRE I was using and the operating system regiona开发者_如何转开发l language.

However, even with Arabic OS (WIndows XP) and the JRE locale is set to Arabic, the window controls are still not mirrored (ie the close sign is still on the top right and the title is still on the top left)

Can anyone help with this please?

Your help is appreciated.

Cheers

MAA


I never saw something like that before. Why you would want the close button on the left side?

Anyway, I think the only solution is make your own dialog (a Window with your buttons on the top).


I believe localization only needs to go as far as the contents of your application (the inner layout and the language of the interface). The native platform's window decorations are outside the scope of Java, unless you choose to turn them off and create your own (but doing this risks making your application even less accessible because users expect to use the OS's windows).

Changing to a different localization doesn't necessarily mean flipping everything even if the text is right-to-left. As far as I'm aware, Windows never changes the window button positions, ever. If an operating system does support customization of the window buttons, then that should remain consistent throughout the OS and not changed by individual programs. Doing otherwise would confuse the user if you guess wrongly.

So, this gives you many good reasons to leave the window layout alone, and also save yourself a lot of effort trying to do something that isn't natively possible in Java, and is not recommended anyway.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜