import java.awt.*;import javax.swing.*;/** This class is used show how to change the layout manager of    a JFrame to a FlowLayout manager.  */public class ChangeLayoutDemo extends JFrame {	/** Constructor: an invisible frame with title t and	    three buttons surrounded by labels.	  */	public ChangeLayoutDemo(String t) {		super(t);				Container cp= getContentPane();		cp.setLayout(new FlowLayout());		       		cp.add(new JLabel("Left Label"));		cp.add(new JButton("first"));		cp.add(new JButton("second"));		cp.add(new JButton("third"));	    cp.add(new JLabel("Right Label"));				pack();	}		public static void main(String[] args) {		ChangeLayoutDemo f= new ChangeLayoutDemo("change layout manager");		f.setVisible(true);	}}