Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2004

Tip: Looking for answers? Try searching our database.

JOptionPane button query

Thread view: 
Desmind - 16 Dec 2004 02:25 GMT
Hi,

Can anyone advise me on how to explicitly set the JOptionPane's button
labels to display my own I18N message(zh_ch)? for example, instead of
"OK", I want to display "OK" in chinese.

Thanks in advance

Desmond
John McGrath - 17 Dec 2004 07:43 GMT
> Can anyone advise me on how to explicitly set the JOptionPane's button
> labels to display my own I18N message(zh_ch)? for example, instead of
> "OK", I want to display "OK" in chinese.

Have you looked at the showOptionDialog() method?

Signature

Regards,

John McGrath

howeekit@gmail.com - 19 Dec 2004 14:13 GMT
Have found a solution after looking thru the java source code

Font font = new Font("mingLiu", 12, Font.PLAIN);
UIManager.put("OptionPane.font", font);
UIManager.put("OptionPane.messageFont", font);
UIManager.put("OptionPane.buttonFont", font);
UIManager.put("OptionPane.okButtonText", "\u7247\u4EEE\u540D" );

Thanks


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.