Example usage for javax.swing JInternalFrame setVisible

List of usage examples for javax.swing JInternalFrame setVisible

Introduction

In this page you can find the example usage for javax.swing JInternalFrame setVisible.

Prototype

@BeanProperty(hidden = true, visualUpdate = true)
public void setVisible(boolean aFlag) 

Source Link

Document

Makes the component visible or invisible.

Usage

From source file:Vista.Main.java

private void itemGraficoHumedadAmbientalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemGraficoHumedadAmbientalActionPerformed
    // TODO add your handling code here:
    controladorLecturas = new ControladorLecturas(dcInicio.getCurrent().getTime(),
            dcFinal.getCurrent().getTime());
    JInternalFrame jInternalFrame = controladorLecturas.graficoHumedadAmbiental();
    desktopPane.add(jInternalFrame);// w  w  w. jav a2  s .  c om
    jInternalFrame.setVisible(true);
}

From source file:Vista.Main.java

private void itemTablaHumedadSueloActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemTablaHumedadSueloActionPerformed
    // TODO add your handling code here:
    controladorLecturas = new ControladorLecturas(dcInicio.getCurrent().getTime(),
            dcFinal.getCurrent().getTime());
    JInternalFrame jInternalFrame = new Tabla(controladorLecturas.tablaHumedadSuelo(),
            "Tabla de Humedad del Suelo");
    desktopPane.add(jInternalFrame);/*from   w  w w .j a v  a  2s. c  o m*/
    jInternalFrame.setVisible(true);
}

From source file:Vista.Main.java

private void itemTablaTemperaturaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemTablaTemperaturaActionPerformed
    // TODO add your handling code here:
    controladorLecturas = new ControladorLecturas(dcInicio.getCurrent().getTime(),
            dcFinal.getCurrent().getTime());
    JInternalFrame jInternalFrame = new Tabla(controladorLecturas.tablaTemperatura(),
            "Tabla de Temperatura Ambiental");
    desktopPane.add(jInternalFrame);/*from   ww  w .  j ava  2  s.  c o m*/
    jInternalFrame.setVisible(true);
}

From source file:Vista.Main.java

private void itemTablaHumedadAmbientalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemTablaHumedadAmbientalActionPerformed
    // TODO add your handling code here:
    controladorLecturas = new ControladorLecturas(dcInicio.getCurrent().getTime(),
            dcFinal.getCurrent().getTime());
    JInternalFrame jInternalFrame = new Tabla(controladorLecturas.tablaHumedadAmbiental(),
            "Tabla de Humedad Ambiental");
    desktopPane.add(jInternalFrame);/*from  w ww.ja v  a  2 s. co m*/
    jInternalFrame.setVisible(true);
}

From source file:MainClass.java

public MainClass() {
    super("Focus Example");
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    MyPanel mypanel = new MyPanel();

    JButton button1 = new JButton("One");
    JButton button2 = new JButton("Two");
    JButton button3 = new JButton("Three");
    JButton button4 = new JButton("Four");
    JButton button5 = new MyButton("Five*");
    JButton button6 = new MyButton("Six*");
    JButton button7 = new JButton("Seven");

    mypanel.add(button2);//from   www . ja va 2s .  co  m
    mypanel.add(button3);

    JInternalFrame frame1 = new JInternalFrame("Internal Frame 1", true, true, true, true);

    frame1.setBackground(Color.lightGray);
    frame1.getContentPane().setLayout(new GridLayout(2, 3));
    frame1.setSize(300, 200);

    frame1.getContentPane().add(button1);
    frame1.getContentPane().add(mypanel);
    frame1.getContentPane().add(button4);
    frame1.getContentPane().add(button5);
    frame1.getContentPane().add(button6);
    frame1.getContentPane().add(button7);

    JDesktopPane desktop = new JDesktopPane();
    desktop.add(frame1, new Integer(1));
    desktop.setOpaque(true);

    // Now set up the user interface window.
    Container contentPane = getContentPane();
    contentPane.add(desktop, BorderLayout.CENTER);
    setSize(new Dimension(400, 300));
    frame1.setVisible(true);
    setVisible(true);
}

From source file:Main.java

public Main() {
    super("Focus Example");
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    MyPanel mypanel = new MyPanel();

    JButton button1 = new JButton("One");
    JButton button2 = new JButton("Two");
    JButton button3 = new JButton("Three");
    JButton button4 = new JButton("Four");
    JButton button5 = new MyButton("Five*");
    JButton button6 = new MyButton("Six*");
    JButton button7 = new JButton("Seven");

    mypanel.add(button2);/*from ww w  .  j  a v a 2  s . co m*/
    mypanel.add(button3);

    JInternalFrame frame1 = new JInternalFrame("Internal Frame 1", true, true, true, true);

    frame1.setBackground(Color.lightGray);
    frame1.getContentPane().setLayout(new GridLayout(2, 3));
    frame1.setSize(300, 200);

    frame1.getContentPane().add(button1);
    frame1.getContentPane().add(mypanel);
    frame1.getContentPane().add(button4);
    frame1.getContentPane().add(button5);
    frame1.getContentPane().add(button6);
    frame1.getContentPane().add(button7);

    JDesktopPane desktop = new JDesktopPane();
    desktop.add(frame1, new Integer(1));
    desktop.setOpaque(true);

    // Now set up the user interface window.
    Container contentPane = getContentPane();
    contentPane.add(desktop, BorderLayout.CENTER);
    setSize(new Dimension(400, 300));
    frame1.setVisible(true);
    setVisible(true);
}

From source file:FocusExample.java

public FocusExample() {

    super("Focus Example");
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    MyPanel mypanel = new MyPanel();

    JButton button1 = new JButton("One");
    JButton button2 = new JButton("Two");
    JButton button3 = new JButton("Three");
    JButton button4 = new JButton("Four");
    JButton button5 = new MyButton("Five*");
    JButton button6 = new MyButton("Six*");
    JButton button7 = new JButton("Seven");

    mypanel.add(button2);/*from   w  w w .  j a  v  a2 s  . c om*/
    mypanel.add(button3);

    JInternalFrame frame1 = new JInternalFrame("Internal Frame 1", true, true, true, true);

    frame1.setBackground(Color.lightGray);
    frame1.getContentPane().setLayout(new GridLayout(2, 3));
    frame1.setSize(300, 200);

    frame1.getContentPane().add(button1);
    frame1.getContentPane().add(mypanel);
    frame1.getContentPane().add(button4);
    frame1.getContentPane().add(button5);
    frame1.getContentPane().add(button6);
    frame1.getContentPane().add(button7);

    JDesktopPane desktop = new JDesktopPane();
    desktop.add(frame1, new Integer(1));
    desktop.setOpaque(true);

    //  Now set up the user interface window.
    Container contentPane = getContentPane();
    contentPane.add(desktop, BorderLayout.CENTER);
    setSize(new Dimension(400, 300));
    frame1.setVisible(true);
    setVisible(true);
}

From source file:de.codesourcery.jasm16.ide.ui.viewcontainers.Perspective.java

@Override
public IView addView(final IView view) {
    if (view == null) {
        throw new IllegalArgumentException("view must not be NULL");
    }//  www  .  j a  va  2s  . com
    final JInternalFrame internalFrame = new JInternalFrame(view.getTitle(), true, true, true, true);

    internalFrame.setBackground(Color.BLACK);
    internalFrame.setForeground(Color.GREEN);

    internalFrame.getContentPane().add(view.getPanel(this));

    SizeAndLocation sizeAndLoc = applicationConfig.getViewCoordinates(getUniqueID(view));
    if (sizeAndLoc != null) {
        internalFrame.setSize(sizeAndLoc.getSize());
        internalFrame.setLocation(sizeAndLoc.getLocation());
    } else {
        internalFrame.setSize(200, 150);
        internalFrame.setLocation(0, 0);
        internalFrame.pack();
    }

    internalFrame.setVisible(true);

    final InternalFrameWithView frameAndView = new InternalFrameWithView(internalFrame, view);

    final InternalFrameListener listener = new InternalFrameAdapter() {

        @Override
        public void internalFrameClosing(InternalFrameEvent e) {
            disposeView(view);
        }
    };

    internalFrame.setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);
    internalFrame.addInternalFrameListener(listener);

    views.add(frameAndView);
    desktop.add(internalFrame);
    return view;
}

From source file:com.opendoorlogistics.studio.appframe.AppFrame.java

@Override
public JComponent launchTableGrid(int tableId) {
    if (loaded != null) {
        for (JInternalFrame frame : getInternalFrames()) {
            if (ODLGridFrame.class.isInstance(frame) && ((ODLGridFrame) frame).getTableId() == tableId) {
                frame.setVisible(true);
                frame.moveToFront();//  w  w w  .  j a  v  a2  s.  c  o  m
                try {
                    frame.setMaximum(true);
                } catch (Throwable e) {
                    throw new RuntimeException(e);
                }
                // if not within visible areas, then recentre?
                return frame;
            }
        }

        ODLTableDefinition table = loaded.getDs().getTableByImmutableId(tableId);
        if (table != null) {
            ODLGridFrame gf = new ODLGridFrame(loaded.getDs(), table.getImmutableId(), true, null,
                    loaded.getDs());
            addInternalFrame(gf, FramePlacement.AUTOMATIC);
            return gf;
        }
    }
    return null;
}

From source file:com.opendoorlogistics.studio.appframe.AppFrame.java

@Override
public void launchTableSchemaEditor(int tableId) {
    if (loaded != null) {
        for (JInternalFrame frame : getInternalFrames()) {
            if (TableSchemaEditor.class.isInstance(frame)
                    && ((TableSchemaEditor) frame).getTableId() == tableId) {
                frame.setVisible(true);
                frame.moveToFront();/*from  w  w w. j  a  v a2  s  . co m*/
                try {
                    frame.setMaximum(true);
                } catch (Throwable e) {
                    throw new RuntimeException(e);
                }
                return;
            }
        }

        TableSchemaEditor gf = new TableSchemaEditor(loaded.getDs(), tableId);
        addInternalFrame(gf, FramePlacement.AUTOMATIC);
    }
}