JAVA Swing Program to create a MDI form and child forms
Posted by MohammadYusuf
Last Updated: October 28, 2016

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.color.*;

public class JInternalFrames
{
public static void main(String[] args)
{
new JInternalFrames();
}
JInternalFrames()
{
JFrame jfrm=new JFrame("multiple document interface");
jfrm.setBackground(Color.white);
JDesktopPane desktop=new JDesktopPane();
jfrm.add(desktop,BorderLayout.CENTER);
desktop.setBackground(Color.white);
jfrm.setSize(450,400);
jfrm.setVisible(true);
for (int i=0; i<5; i++)
{
JInternalFrame frame=new JInternalFrame(("MDI'S forms"),true, true,true,true);
frame.setLocation(i*50+10,i*50+10);
frame.setSize(200,150);
frame.setBackground(Color.red);
frame.setVisible(true);
desktop.add(frame);
frame.moveToFront();
}
}
}

Related Content
JAVA Swing program to create a Scrolling Text
JAVA Swing program to create a Scrolling Text
MohammadYusuf | Oct 28, 2016