Hi...Plz help how to program such that when I click a button, it invokes another form using Java Swing...
Hi...Plz help how to program such that when I click a button, it invokes another form using Java Swing...
You may use the following method in your program for the button click which will allow you to open the form on just a single click.
public NewJFrame() {
initComponents();
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new NewJFrame1().setVisible(true);
}
});
}
Bookmarks