I have 2 JFrame
s:
- first frame has a 3
JButton
s: #1 #2 #3 - second frame has a
JTabbedPane
with 3 tabs, each with aJPanel
When I press one of the buttons from first frame I want to open the second frame and focus on the corresponding tab in JTabbedPane
(button #1 -> tab #1, button #2 -> tab #2, etc)
JButton btnNewButton = new JButton("Modifica");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
FirmaDateModifica frame = new FirmaDateModifica();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
// Is there something I can do here?
}
});