Example usage for javax.swing JInternalFrame JInternalFrame

List of usage examples for javax.swing JInternalFrame JInternalFrame

Introduction

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

Prototype

public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable) 

Source Link

Document

Creates a non-iconifiable JInternalFrame with the specified title, resizability, closability, and maximizability.

Usage

From source file:Main.java

public static void main(String[] args) {
    String TITLE = "Full Screen Test";
    JFrame f = new JFrame(TITLE);
    JDesktopPane jdp = new JDesktopPane();

    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice dev = env.getDefaultScreenDevice();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JInternalFrame jif = new JInternalFrame(TITLE, true, true, true);
    jif.add(new JLabel(TITLE + " " + TITLE), BorderLayout.NORTH);
    jif.add(new JLabel(TITLE + " " + TITLE), BorderLayout.CENTER);
    jif.add(new JLabel(TITLE + " " + TITLE), BorderLayout.SOUTH);
    jif.pack();//  w  ww  .  j a  v a2s . c  o m
    jif.setLocation(100, 100);
    jif.setVisible(true);
    jdp.add(jif);
    f.add(jdp, BorderLayout.CENTER);
    dev.setFullScreenWindow(f);

}