package uiintro;

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

public class DemoController extends JFrame {

  public DemoController() {
    this.setSize(150, 280);

    this.getContentPane().setLayout(new FlowLayout());
    JButton b1 = new JButton("DrawDemo");
    b1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        DrawDemo dd = new DrawDemo();
      }
    });
    this.getContentPane().add(b1);

    JButton b15 = new JButton("PaintDemo");
    b15.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        PaintDemo pd = new PaintDemo();
      }
    });
    this.getContentPane().add(b15);

    JButton b2 = new JButton("ButtonDemo");
    b2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        ButtonDemo1 bd = new ButtonDemo1();
      }
    });
    this.getContentPane().add(b2);

    JButton b3 = new JButton("MenuBarDemo");
    b3.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        MenuBarDemo mbd = new MenuBarDemo();
      }
    });
    this.getContentPane().add(b3);

    JButton b4 = new JButton("RadioButtonDemo");
    b4.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        RadioButtonDemo rbd = new RadioButtonDemo();
      }
    });
    this.getContentPane().add(b4);

    JButton b5 = new JButton("ListDemo");
    b5.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        ListDemo ld = new ListDemo();
      }
    });
    this.getContentPane().add(b5);

    JButton b6 = new JButton("TreeDemo");
    b6.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        TreeDemo td = new TreeDemo();
      }
    });
    this.getContentPane().add(b6);

    JButton bn = new JButton("Quit");
    bn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        System.exit(0);
      }
    });

    this.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent we) {
        System.exit(0);
      }
    });

  }

  public static void main(String args[]) {
    DemoController dc = new DemoController();
    dc.setVisible(true);
  }
}