@@ -0,0 +1,2057 @@
+/*%0A%0AProgrammers: Kris Larson%0A%0ADescription: Uses JFrame and Timer to create new buttons during %0A  the run.%0A  %0A*/%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0Aimport javax.swing.*;%0Aimport java.util.Timer;%0Aimport java.util.TimerTask;%0A%0Apublic class GUIFun2 extends TimerTask %7B%0A%09 %0A   private JFrame frame;%0A   private JPanel panel;%0A   private JButton button;%0A   private JButton button2;%0A   private static long interval = 1000;%0A   private int count = 0;%0A   private String str = %22%22 + count;%0A%0A   public GUIFun2()%7B%0A       frame = new JFrame();%0A       frame.setSize(500,500);%0A       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A        %0A       panel = new JPanel();%0A%0A       button = new JButton(str);%0A       button.addActionListener(new ActionListener()%7B%0A%0A           public void actionPerformed(ActionEvent e)%7B%0A               JOptionPane.showMessageDialog(null, %22You clicked the JButton%22);%0A           %7D%0A       %7D);%0A       %0A%0A       panel.add(button);%0A       %0A       frame.add(panel);%0A       frame.setVisible(true);%0A       buttonCreation();%0A   %7D%0A   %0A   public void buttonCreation() %7B%0A      count++;%0A      str = %22%22 + count;%0A      %0A      if (count %3E 100) %7B%0A         button2 = new JButton(str);%0A         button2.addActionListener(new ActionListener()%7B%0A         %0A             public void actionPerformed(ActionEvent e)%7B%0A                 JOptionPane.showMessageDialog(null, %22Wow! You're patient.%22);%0A             %7D%0A         %7D);%0A      %7D%0A      else %7B%0A         button2 = new JButton(str);%0A         button2.addActionListener(new ActionListener()%7B%0A         %0A             public void actionPerformed(ActionEvent e)%7B%0A                 JOptionPane.showMessageDialog(null, %22Timer! Weeeeh!%22);%0A             %7D%0A         %7D);%0A      %7D%0A      panel.add(button2);%0A   %7D%0A   %0A   public void run() %7B%0A      buttonCreation();%0A      frame.setSize(500,501);%0A      frame.setSize(500,500);%0A   %7D%0A   %0A   %0A   public static void main(String%5B%5D args) %7B%0A      Timer timer = new Timer(%22Printer%22);%0A%0A      GUIFun2 t = new GUIFun2();%0A %0A      timer.schedule(t, 0, interval);%0A   %7D%0A%7D%0A

Create GUIFun2.java