|
-
Oct 9th, 2007, 05:40 PM
#1
Thread Starter
Lively Member
Java won't let me do this declaration!
When I try to add the string argument I keep getting the error:
errorMessage(java.lang.String) in ProjectFile cannot be applied to ()
Code:
public static void errorMessage(String defineError) {
JOptionPane.showMessageDialog(null,
"There is an error in the account file!\n" +
"Please contact your branch to resolve this problem." +
defineError, "Banking Error:", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
This is kind of urgent, so any help would be greatly appreciated
-
Oct 10th, 2007, 02:35 PM
#2
Re: Java won't let me do this declaration!
This code is working fine for me
Code:
import javax.swing.JOptionPane;
public class Main {
public static void main(String[] args) {
Main.errorMessage("Error Message");
}
public static void errorMessage(String defineError) {
JOptionPane.showMessageDialog(null, "There is an error in the account file!\n" + "Please contact your branch to resolve this problem." + defineError, "Banking Error:", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
}
I don't know what seems to be the problem
Last edited by ComputerJy; Oct 10th, 2007 at 02:49 PM.
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|