I have a basic GUI class with a frame, a table, and a button. I want to make it launch from the ActionListener of another one of my basic GUI frames located in a different class
this is my main class:
public class IA {
public static void main(String[] args) {
MainFrame m1 = new MainFrame();
m1.setVisible(true);
} /*enter code here*/
public static void vts1 () {
ViewTeamStatistics v1 = new ViewTeamStatistics();
v1.setVisible(true);
}
}
It initiates my main menu and from the main menu i want to initiate another class named ViewTeamStatistics this is the actionperformed. this is what is supposed to tell the program to open the frame after i press the button
private void vtsActionPerformed(java.awt.event.ActionEvent evt) {
ViewTeamStatistics v1 = new ViewTeamStatistics();
v1.setVisible(true);
}
The compiler comes back with no errors but when I run the program and press the button nothing happens.