Code Of Graphical Use Interface
import java.awt.Color;
import java.awt.Container;
import javax.swing.JButton;
import javax.swing.JFrame;
import java.awt.FlowLayout;
public class GUI
{
JFrame frame;
JButton btn1,btn2,btn3,btn4,btn5,btn6;
public void initialize()
{
frame = new JFrame("Flow Layout Example");
Container con = frame.getContentPane();
con.setBackground(Color.BLUE);
btn1 = new JButton("Button 1");
btn2 = new JButton("Button 2");
btn3 = new JButton("Button 3");
btn4 = new JButton("Button 4");
btn5 = new JButton("Button 5");
btn6 = new JButton("Button 6");
frame.setLayout(new FlowLayout());
frame.add(btn1); frame.add(btn2);frame.add(btn3);frame.add(btn4);
frame.add(btn5);frame.add(btn6);
frame.setVisible(true);
frame.setSize(300,400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
}
import java.awt.Color;
import java.awt.Container;
import javax.swing.JButton;
import javax.swing.JFrame;
import java.awt.FlowLayout;
public class GUI
{
JFrame frame;
JButton btn1,btn2,btn3,btn4,btn5,btn6;
public void initialize()
{
frame = new JFrame("Flow Layout Example");
Container con = frame.getContentPane();
con.setBackground(Color.BLUE);
btn1 = new JButton("Button 1");
btn2 = new JButton("Button 2");
btn3 = new JButton("Button 3");
btn4 = new JButton("Button 4");
btn5 = new JButton("Button 5");
btn6 = new JButton("Button 6");
frame.setLayout(new FlowLayout());
frame.add(btn1); frame.add(btn2);frame.add(btn3);frame.add(btn4);
frame.add(btn5);frame.add(btn6);
frame.setVisible(true);
frame.setSize(300,400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
}