use of javax.swing.JInternalFrame in project sic by belluccifranco.
the class PrincipalGUI method mnuItm_ProveedoresActionPerformed.
//GEN-LAST:event_mnuItm_UsuariosActionPerformed
private void mnuItm_ProveedoresActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_mnuItm_ProveedoresActionPerformed
JInternalFrame gui = Utilidades.estaEnDesktop(getDesktopPane(), ProveedoresGUI.class);
if (gui == null) {
gui = new ProveedoresGUI();
gui.setLocation(getDesktopPane().getWidth() / 2 - gui.getWidth() / 2, getDesktopPane().getHeight() / 2 - gui.getHeight() / 2);
getDesktopPane().add(gui);
gui.setVisible(true);
} else {
//selecciona y trae al frente el internalframe
try {
gui.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);
}
}
}
use of javax.swing.JInternalFrame in project sic by belluccifranco.
the class PrincipalGUI method mnuItm_ClientesActionPerformed.
//GEN-LAST:event_mnuItm_ProductosActionPerformed
private void mnuItm_ClientesActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_mnuItm_ClientesActionPerformed
JInternalFrame gui = Utilidades.estaEnDesktop(getDesktopPane(), ClientesGUI.class);
if (gui == null) {
gui = new ClientesGUI();
gui.setLocation(getDesktopPane().getWidth() / 2 - gui.getWidth() / 2, getDesktopPane().getHeight() / 2 - gui.getHeight() / 2);
getDesktopPane().add(gui);
gui.setVisible(true);
} else {
//selecciona y trae al frente el internalframe
try {
gui.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);
}
}
}
use of javax.swing.JInternalFrame in project GCViewer by chewiebug.
the class Arrange method actionPerformed.
public void actionPerformed(final ActionEvent e) {
final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames();
final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager();
for (int i = 0; i < frames.length; i++) {
final JInternalFrame frame = frames[i];
desktopManager.deiconifyFrame(frame);
try {
frame.setMaximum(false);
} catch (PropertyVetoException e1) {
e1.printStackTrace();
}
final int height = gcViewer.getDesktopPane().getHeight() / frames.length;
desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height);
}
}
use of javax.swing.JInternalFrame in project jdk8u_jdk by JetBrains.
the class InsetsEncapsulation method run.
@Override
public void run() {
runTest(new JLabel("hi"));
runTest(new JMenu());
runTest(new JTree());
runTest(new JTable());
runTest(new JMenuItem());
runTest(new JCheckBoxMenuItem());
runTest(new JToggleButton());
runTest(new JSpinner());
runTest(new JSlider());
runTest(Box.createVerticalBox());
runTest(Box.createHorizontalBox());
runTest(new JTextField());
runTest(new JTextArea());
runTest(new JTextPane());
runTest(new JPasswordField());
runTest(new JFormattedTextField());
runTest(new JEditorPane());
runTest(new JButton());
runTest(new JColorChooser());
runTest(new JFileChooser());
runTest(new JCheckBox());
runTest(new JInternalFrame());
runTest(new JDesktopPane());
runTest(new JTableHeader());
runTest(new JLayeredPane());
runTest(new JRootPane());
runTest(new JMenuBar());
runTest(new JOptionPane());
runTest(new JRadioButton());
runTest(new JRadioButtonMenuItem());
runTest(new JPopupMenu());
runTest(new JScrollBar());
runTest(new JScrollPane());
runTest(new JViewport());
runTest(new JSplitPane());
runTest(new JTabbedPane());
runTest(new JToolBar());
runTest(new JSeparator());
runTest(new JProgressBar());
if (!failures.isEmpty()) {
System.out.println("These classes failed");
for (final Component failure : failures) {
System.out.println(failure.getClass());
}
throw new RuntimeException("Test failed");
}
}
use of javax.swing.JInternalFrame in project jdk8u_jdk by JetBrains.
the class MetalworksFrame method newDocument.
public void newDocument() {
JInternalFrame doc = new MetalworksDocumentFrame();
desktop.add(doc, DOCLAYER);
try {
doc.setVisible(true);
doc.setSelected(true);
} catch (java.beans.PropertyVetoException e2) {
}
}
Aggregations