我的程序应该做的是,当你输入一个像"two"这样的字符串而不是数字时,弹出窗口会显示出来:你必须输入正数值数据!我有那个部分,但我想改变弹出窗口顶部的标题.现在它只是说"消息".
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog(this, "You must enter positive numeric data!");
}
Run Code Online (Sandbox Code Playgroud)
我需要它看起来更像这样:http://homepages.uc.edu/~thomam/OOProg_1/assignment3.html
顺便说一下,我使用NetBeans作为我的IDE.