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);
}
}
Aggregations