Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道在使用这样的命令时如何控制提示框的大小:
int p = promptUserForInput ("enter the number of sugar you want for your coffee?", 0 )
当我写这篇文章时,盒子开口正在削减标题问题。我怎样才能要求盒子适合句子?
是javax.swing.JOptionPane.showInputDialog吗?我通常在输入字符串的末尾添加一些额外的空格,因为 java 经常搞乱代表字符串中字符数的像素数的计算。
javax.swing.JOptionPane.showInputDialog
另一种方法是使用\n字符将消息分成多行,或将其改写为更小的选项。
\n