import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.JFrame; //import javax.swing.JOptionPane; class SaveListener2 implements ActionListener { private JFrame gui; // constructor public SaveListener2(JFrame guiref) { gui = guiref; } // method required by action listener interface public void actionPerformed(ActionEvent e) { System.out.println("AQUI SE HACE TODA LA OPERACION DE GUARDADO DE UN PACIENTE"); JPanel contentPane = (JPanel)(gui.getContentPane()); personalPane pane1 = (personalPane)(contenPane.getTopComponent()); JSplitPane pane2 = (JSplitPane)(contenPane.getBottomComponent()); } }