Main Method Can't Find It's Parent Class
I've been working out the kinks in this little project of mine for a few weeks, and now I'm trying to get the GUI working. I used NetBeans to make a GUI, and then copied the source code back into BlueJ (Which I'm in the process of growing out of).
When I try to compile the Battle class with the main method in it, I get this error: "cannot find symbol - constructor Battle()" which doesn't make any sense to me since it's inside the Battle class.
Here's the main method:
Code:
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Battle().setVisible(true);
}
});
}
I thought maybe it had something to do with the fact that the class takes some parameters, and I put them into the method as well, which looked like this:
Code:
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Battle(Player[] t, Player[] f, String i, String v).setVisible(true);
}
});
}
but when I do that I get a ".class expected" error. What the heck is happening??