import java.awt.*;
import javax.swing.*;
public class CardLayoutManagerExample  extends JFrame {
	
	public CardLayoutManagerExample(String title) {
		super(title);

		CardLayout layoutManager = new CardLayout(0,0);
        setLayout(layoutManager);

        // Add (and give names to) components using the layout manager
        JLabel first = new JLabel(new ImageIcon("trilobot.jpg")); 
    	JLabel second = new JLabel(new ImageIcon("laptop.jpg")); 
    	JLabel third = new JLabel(new ImageIcon("satelite.jpg"));
        add("first", first);
        add("second", second);
        add("third", third);
        
        // Pick the component to show, in this case, the first
        layoutManager.show(getContentPane(), "first");
        
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(200,172);
  	}

    public static void main(String args[]) {
		CardLayoutManagerExample frame =  new CardLayoutManagerExample("Card Layout Example");
        frame.setVisible(true);
	}
}