我的GUI程序中用到JOptionPane.showInputDialog和JOptionPane.showMessageDialog现在做多国语言化的时候出现麻烦,这两个对话框的按钮文本时跟随操作系统的,不能自由定义。我的意图并不是设置按钮的语言类型,而是改变按钮的文本。如果中文操作系统下是"确定" 、“取消”,改成“好”、“关闭”
解决方案 »
- Dom4J中Node.selectNode(String)的使用方法
- 大侠们,如何用jS判断本地某个文件是否存在?
- 急,Calendar.MONTH的问题?
- 那位给点思路!
- 请问怎么将数据库中的数据添加到frame中的jtable里!
- ****请教struts 国际化问题,100分。请大家帮忙****
- ==和equals()
- 请问这段java程序错在哪里???
- 为我的jsp聊天室出点主意吧(没做过的不妨尝尝这个挑战哦)。
- 在线救助
- WEBLOGIC启动后出现javax.security.auth.login.failedloginexception?
- 关于struts2的配置文件加载路径设置,各位有兴趣进来瞄一下
int n = JOptionPane.showOptionDialog(null,
"Would you like green eggs and ham?",
"A Silly Question",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, // do not use a custom Icon
options, // the titles of buttons
options[0]); // default button title
贴出来,大家共享
UIManager.put("OptionPane.titleText", "确认对话框");
UIManager.put("OptionPane.yesButtonText", "好了");
UIManager.put("OptionPane.noButtonText", "不行");
UIManager.put("OptionPane.cancelButtonText", "关闭");
JOptionPane.showConfirmDialog(null, "confirm");