我已经构建了Swing GUI的类JDialog form(diglog_promotion)
和一个按钮。我想点击按钮时显示JDialog
表单,以便我编码
dialog_promotion f = new dialog_promotion();
f.setVisible(true);
单击按钮后,它出现错误:
不支持YET
我尝试将它用于eclipe它的工作原理 我错了什么?
答案 0 :(得分:2)
Inside of your method Actionperformed for any particular case you want call JoptionPane.showMessageDialog(,); with the message you want. I have tried this in netbeans it works.
private void btnSaveActionPerformed(java.awt.event.ActionEvent evt)
{
...
...
if(saveisclicked)
{
System.out.println("Please Fill user name");
JOptionPane.showMessageDialog(null, "Please Enter User Name field");
}
...
...