checking if a jbutton is clicked in another java file
问题 good day everyone. I have many java files in a project in netbeans. One file is named mainFile while some are addSale, addAttendance. In my mainFile.java, I created an actionPerformed method to check if a button is clicked. But the buttons that I want to checked if clicked is on the other java files. I've added this code in my mainFile.java AddSales addSaleButton; Login logButton; public void actionPerformed(ActionEvent ae){ if (ae.getSource() == addSaleButton.getButton()){ System.out.print(