帮忙改一下小代码
String str=JOptionPane.showInputDialog(null,"产品代码:","请输入产品代码",JOptionPane.QUESTION_MESSAGE);
if(str==null)
{
?//如何关闭JOptionPane?
}
else
{
...............................//code
if(.....//str的判断)
{
JOptionPane.showMessageDialog(null,"你输入的代码不存在,请检查输入是否正确或进入新产品入库!","出错了!",JOptionPane.WARNING_MESSAGE);
?//如何返回到第一句Sting.................
}
else
{
.........//code
}
}
问题在?处,帮忙改一下,谢了!