0
Guys, I wanted to ask a favor, I wanted someone to show me how to create an event of a Jbutton, like, a q button when you click on it it opens another Jframe and closes the old one
use this code as an example
import javax.swing.JFrame;
import javax.swing.JButton;
public class inicio{
public void main(String[] args){
JFrame frame = new JFrame();
JButton bta = new JButton(“Clique aqui”);
frame.setVisible(true);
}
}
then the person clicks on the button "click here" and opens another Jframe and closes what was open, Obs: explain in the simplest way possible and avoid putting lines for the program to be more beautiful