From 1251becb77ebeb1ab36302a72a934a8d4044dcfa Mon Sep 17 00:00:00 2001 From: lwm14001 Date: Sun, 2 Oct 2016 16:33:48 -0400 Subject: [PATCH 1/4] well I guess this worked --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4191add..7ef07f4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Student-Admin-Redesign This is a redesign of student admin by group 2 +Wonder if this will work. Hmmmmmmmm. From 58ee9e9b106691e7b2ecd99c9cb6070bb5fb10a6 Mon Sep 17 00:00:00 2001 From: lwm14001 Date: Sun, 2 Oct 2016 16:43:19 -0400 Subject: [PATCH 2/4] lets try this again --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7ef07f4..bc904d9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Student-Admin-Redesign +Changes Changes Changes This is a redesign of student admin by group 2 + Wonder if this will work. Hmmmmmmmm. From c7fcf32ce37c82f89e1e6a310c241d28cddec83f Mon Sep 17 00:00:00 2001 From: Ryan M Blau Date: Wed, 12 Oct 2016 15:02:24 -0400 Subject: [PATCH 3/4] Sample applet --- Sample applet | 1 + 1 file changed, 1 insertion(+) create mode 100644 Sample applet diff --git a/Sample applet b/Sample applet new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Sample applet @@ -0,0 +1 @@ + From 20f306fb5e2d25fbfa086a837aa71907aa030e27 Mon Sep 17 00:00:00 2001 From: Ryan M Blau Date: Wed, 12 Oct 2016 15:02:52 -0400 Subject: [PATCH 4/4] Update Sample applet --- Sample applet | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/Sample applet b/Sample applet index 8b13789..25bcc71 100644 --- a/Sample applet +++ b/Sample applet @@ -1 +1,44 @@ +package example_applet; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.HeadlessException; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.JApplet; +import javax.swing.JButton; + +/* + * Created on Oct 6, 2004 + * + * @author Steve Tanimoto + */ +@SuppressWarnings("serial") +public class TrafficLight extends JApplet implements ActionListener { + int phase = 0; + Container c; + /** + * @throws java.awt.HeadlessException + */ + public TrafficLight() throws HeadlessException { + JButton jb = new JButton("Change!"); + c = this.getContentPane(); + c.setLayout(new BorderLayout()); + c.add(jb, BorderLayout.SOUTH); + jb.addActionListener(this); + c.setBackground(Color.green); + } + public void actionPerformed(ActionEvent e) { + phase = (phase + 1) % 3; + if (phase == 0) { + c.setBackground(Color.green); + } + else if (phase == 1) { + c.setBackground(Color.yellow); + } + else if (phase == 2) { + c.setBackground(Color.red); + } + } +}