ChatPGT |
您所在的位置:网站首页 › vray41英文怎么改中文 › ChatPGT |
前两天装了个cursor
Cursor | Build FastRefactor, understand, and write code effortlessly with Cursor. 直接让输出Java的Joption的用法, 选择对话框 import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { int result = JOptionPane.showConfirmDialog(null, "Do you want to continue?"); if (result == JOptionPane.YES_OPTION) { System.out.println("You chose to continue."); } else if (result == JOptionPane.NO_OPTION) { System.out.println("You chose not to continue."); } else { System.out.println("You closed the dialog or clicked Cancel."); } } }界面效果类似下面的,一看中英文结合啊,效果不好,改成统一中文 于是 添加如下代码就好使了 UIManager.put("OptionPane.yesButtonText", "是"); UIManager.put("OptionPane.noButtonText", "否");效果如下
参考: JOptionPane.showConfirmDialog()提示按钮显示英文,如何改为中文_百度知道 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |