aboutsummaryrefslogtreecommitdiff
path: root/src/AlertBox.java
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
committerJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
commit1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch)
tree926cef8cb76d46862ed2c4ec7028720611e47476 /src/AlertBox.java
downloadModulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip
added source
Diffstat (limited to 'src/AlertBox.java')
-rw-r--r--src/AlertBox.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/AlertBox.java b/src/AlertBox.java
new file mode 100644
index 0000000..14f20fc
--- /dev/null
+++ b/src/AlertBox.java
@@ -0,0 +1,41 @@
+/* */ import java.awt.BorderLayout;
+/* */ import java.awt.Toolkit;
+/* */ import java.awt.event.ActionEvent;
+/* */ import java.awt.event.ActionListener;
+/* */ import javax.swing.JButton;
+/* */ import javax.swing.JFrame;
+/* */ import javax.swing.JLabel;
+/* */ import javax.swing.JPanel;
+/* */
+/* */ public class AlertBox extends JFrame
+/* */ implements ActionListener
+/* */ {
+/* */ private JPanel bottom;
+/* */ private JPanel top;
+/* */ private JButton ok;
+/* */
+/* */ public AlertBox(String message, String title)
+/* */ {
+/* 19 */ setTitle(title);
+/* 20 */ setLayout(new BorderLayout());
+/* 21 */ this.bottom = new JPanel();
+/* 22 */ this.top = new JPanel();
+/* 23 */ add(this.top, "North");
+/* 24 */ add(this.bottom, "South");
+/* 25 */ this.top.add(new JLabel(message));
+/* 26 */ this.ok = new JButton("OK");
+/* 27 */ this.bottom.add(this.ok);
+/* 28 */ this.ok.addActionListener(this);
+/* 29 */ setVisible(true);
+/* 30 */ setIconImage(Toolkit.getDefaultToolkit().getImage("modulus_symbol.png"));
+/* 31 */ pack();
+/* */ }
+/* 33 */ public void actionPerformed(ActionEvent e) { setVisible(false); }
+/* 34 */ public static void throwError(String alert) { new AlertBox(alert, "Error"); }
+/* */
+/* */ }
+
+/* Location: Modulus.jar
+ * Qualified Name: AlertBox
+ * JD-Core Version: 0.6.2
+ */ \ No newline at end of file