DIFFERENCE BETWEEN INTERNAL FRAME AND MAIN FRAME:-
Internal frames are not windows or top level container because we add them into a main window.They are also different because we can iconify or maximize internal frame by making changes in code.
IMPORTANT POINTS REGARDING INTERNAL FRAMES:-
JInternalFrame(String tittle,boolean closable,boolen resizable,boolean iconify)
CODING:
import javax.swing.*;
import java.awt.*;
class myjframe1 extends JFrame
{
public myjframe1()
{
setTitle("Internal Frames");
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(700, 500);
setLayout(null);
JInternalFrame in = new JInternalFrame("InternalFrame",true,false,true);
in.setVisible(true);
in.setLocation(90,50);
in.setSize(400,210);
add(in);
JInternalFrame in1 = new JInternalFrame("InternalFrame 1",true,true,false);
in1.setVisible(true);
in1.setLocation(600,50);
in1.setSize(400,400);
add(in1);
setVisible(true);
}
}
class simpframe
{
public static void main(String args[])
{
myjframe1 x= new myjframe1();
}
}
0 comments:
Post a Comment