Hi friend,
I suggest you to refer following example of java, which will give you some idea about the JDesktopPane class of java:
Code:
import javax.swing.JDesktopPane;
import javax.swing.JLabel;
public class JDesktopPaneDM
{
public static void main(final String[] args) {
JFrame VMX = new JFrame();
VMX.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JDesktopPane desktop1 = new JDesktopPane();
JInternalFrame internalFrame = new JInternalFrame("Can Do All", true, true, true, true);
desktop1.add(internalFrame);
internalFrame.setBounds(35, 35, 200, 100);
JLabel label1 = new JLabel(internalFrame.getTitle(), JLabel.CENTER);
internalFrame.add(label1, BorderLayout.CENTER);
internalFrame.setVisible(true);
VMX.add(desktop, BorderLayout.CENTER);
VMX.setSize(500, 300);
VMX.setVisible(true);
}
}
Bookmarks