Search in sources :

Example 36 with JInternalFrame

use of javax.swing.JInternalFrame in project sic by belluccifranco.

the class CajasGUI method verDetalle.

private void verDetalle(Caja caja) {
    JInternalFrame iFrameCaja = Utilidades.estaEnDesktop(getDesktopPane(), CajaGUI.class);
    if (iFrameCaja != null) {
        iFrameCaja.dispose();
    }
    iFrameCaja = new CajaGUI(caja);
    iFrameCaja.setLocation(getDesktopPane().getWidth() / 2 - iFrameCaja.getWidth() / 2, getDesktopPane().getHeight() / 2 - iFrameCaja.getHeight() / 2);
    getDesktopPane().add(iFrameCaja);
    iFrameCaja.setVisible(true);
    try {
        iFrameCaja.setSelected(true);
    } catch (PropertyVetoException ex) {
        String msjError = "No se pudo seleccionar la ventana requerida.";
        LOGGER.error(msjError + " - " + ex.getMessage());
        JOptionPane.showInternalMessageDialog(this.getDesktopPane(), msjError, "Error", JOptionPane.ERROR_MESSAGE);
    }
}
Also used : PropertyVetoException(java.beans.PropertyVetoException) JInternalFrame(javax.swing.JInternalFrame)

Aggregations

JInternalFrame (javax.swing.JInternalFrame)36 Point (java.awt.Point)12 PropertyVetoException (java.beans.PropertyVetoException)12 Dimension (java.awt.Dimension)9 Component (java.awt.Component)7 JPanel (javax.swing.JPanel)7 JScrollPane (javax.swing.JScrollPane)7 JTable (javax.swing.JTable)7 BorderLayout (java.awt.BorderLayout)6 JButton (javax.swing.JButton)6 JLabel (javax.swing.JLabel)6 JComponent (javax.swing.JComponent)5 JMenu (javax.swing.JMenu)4 Jynstrument (jmri.jmrit.jython.Jynstrument)4 Container (java.awt.Container)3 JDesktopPane (javax.swing.JDesktopPane)3 JMenuBar (javax.swing.JMenuBar)3 JMenuItem (javax.swing.JMenuItem)3 TableRowSorter (javax.swing.table.TableRowSorter)3 ButtonEditor (jmri.util.table.ButtonEditor)3