I have 3 classes in total.
Run.java
- the java class which contains the main method to run the other 2 classes.
public static void main(String[] args)
{toGUI tg = new toGUI();
}
toLogic.java
- no main method, needs to pass methods to toGUI.java
toGUI.java
- no main method. Created an instance of toLogic class private toLogic tlg; and in the toGUI constructor I added in parameters public toGui(toLogic tlg){ }; to accept methods from toLogic class.
However, now the problem is that the main method of Run.java doesn't execute as the constructor of toGUI class has parameters. How do I code the main method in Run.java to execute the object of toGUI class ?
Thanks.
Run.java
- the java class which contains the main method to run the other 2 classes.
public static void main(String[] args)
{toGUI tg = new toGUI();
}
toLogic.java
- no main method, needs to pass methods to toGUI.java
toGUI.java
- no main method. Created an instance of toLogic class private toLogic tlg; and in the toGUI constructor I added in parameters public toGui(toLogic tlg){ }; to accept methods from toLogic class.
However, now the problem is that the main method of Run.java doesn't execute as the constructor of toGUI class has parameters. How do I code the main method in Run.java to execute the object of toGUI class ?
Thanks.