我确实需要你的帮助。如何修改此代码语句?
我有这样的代码:
File f1 = openFile("Choose file one",
JFileChooser.OPEN_DIALOG);
if (f1 == null)
return;
File f2 = openFile("Choose file two",
JFileChooser.OPEN_DIALOG);
if (f2 == null)
return;
File f3 = openFile("Choose destination",
JFileChooser.SAVE_DIALOG);
if (f3 == null)
return;
JOptionPane.showMessageDialog(this, "Files are now joined in"
+ f3.getName());
我想摆脱这样的:
File f3 = openFile("Choose destination",
JFileChooser.SAVE_DIALOG);
if (f3 == null)
return;
,并使用以下代码语句,这样一来,但不幸的是我得到的错误..!
OptionPane.showMessageDialog(this, "Files are now joined in"
+ f1.getName() + f2.getName());
我该如何解决问题?
哪个错误?我的意思是说,超过15个字符:哪些错误? – 2010-07-07 10:14:42
你得到了什么错误?您在JOptionPane中缺少J。 – 2010-07-07 10:14:54
你实际上想通过你的改变实现什么? – 2010-07-07 10:15:07