
import java.awt.*;
import java.awt.event.*;

import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.UIManager;
import javax.swing.*;
 
public class NimbusLookAndFeelExample extends JFrame {
 
    public NimbusLookAndFeelExample() {
        super("NimbusLookAndFeelExample");
        setDefaultCloseOperation(EXIT_ON_CLOSE);

        setPreferredSize(new Dimension(640, 480));
        setLayout( new BorderLayout() );
        setSize(600,500);
 
        JDesktopPane desktopPane = new JDesktopPane();
 
        Dimension d = new Dimension(160, 120);
        for (int i = 0; i < 5; i++) {
            JInternalFrame frm = new JInternalFrame("InternalFrame" + i, true,
                    true, true, true);
            frm.setSize(d);
            frm.setVisible(true);
            desktopPane.add(frm);
        }
 
        add(desktopPane, BorderLayout.CENTER);
 
        //pack();
        setVisible(true);
    }
 
    /**
     * @param args
     */
    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        NimbusLookAndFeelExample frame = new NimbusLookAndFeelExample();
        frame.setVisible(true);
    }
 
}