I have worked out a different way off doing it. To do it you make a new file let’s say it called ButtonDefinition and the code you would do to run it is
new ButtonDefinition().ButtonDefinition1();
Then you would add in ButtonDefinition file
if (main1.equals(“Test”)){
if (main2.equals(“Test2”)){
New Test().Test2();
}
}
So for each file you want to add you add this code to the ButtonDefinition file.
solved How to use reflection to run two variables