【发布时间】:2013-09-22 22:07:13
【问题描述】:
我已经尝试过其他主题,所以请不要将我发送到其他主题/教程,因为我还没有设法理解它并且我已经尝试过。如果您没有帮助,请不要回复。
I would like to change this code to display only "OK" and delete the cancel button.
Object contestacion5 = JOptionPane.showInputDialog(null, "#5 Que describe mejor a la Norteña?", "Examen Tijuanas PR", //3
JOptionPane.DEFAULT_OPTION, null,
new Object[] {"Ensalada de espinacas, tomates, zetas, cebolla, tocineta, aguacate, queso de hoja y tiras de maiz crujientes en vinagreta de la casa.",
"Lechuga romana servida con tomate, cebolla, maiz, aguacate, queso de hoja y tiritas de maiz crujientes acompañado de su seleccion de filetes de pollo de res.",
"Ensalada vegetariana de nopales, tomates, cebolla, lechuga romana, queso de hoja, aguacate, y aderezo especial de la casa." }, null);
这是图片,我想要它,但没有取消按钮,谢谢!
我尝试过这样做:Is there a way to only have the OK button in a JOptionPane showInputDialog (and no CANCEL button)?
这就是它显示的内容:
【问题讨论】:
-
在您显示的链接中分享您用来尝试该方法的代码。这非常简单,出了什么问题?
-
另外:请不要转发您的问题。改用旧的;这个将被标记为重复。 stackoverflow.com/questions/18946681/…
-
-1
so please do not send me to another topic/tutorial because I have not managed to understand it and I HAVE TRIED. If you are not helping please do not reply.- 我向您指出的教程有一个工作示例。由于您的代码不起作用,您显然没有阅读教程或从工作示例开始。我们不是来给你喂食和写代码的。强迫您阅读教程并尝试示例确实对您有所帮助。如果您不学习阅读和遵循示例,就无法编程。
标签: java swing joptionpane