diff gui/edu/unc/genomics/ButtonLabel.java @ 2:e16016635b2a

Uploaded
author timpalpant
date Mon, 13 Feb 2012 22:12:06 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/edu/unc/genomics/ButtonLabel.java	Mon Feb 13 22:12:06 2012 -0500
@@ -0,0 +1,50 @@
+package edu.unc.genomics;
+
+import javax.swing.Action;
+import javax.swing.BorderFactory;
+import javax.swing.Icon;
+import javax.swing.JButton;
+
+/**
+ * Act like a button, look like a label
+ * 
+ * @author timpalpant
+ *
+ */
+public class ButtonLabel extends JButton {
+
+	private static final long serialVersionUID = -4449260534784095223L;
+
+	public ButtonLabel() {
+		init();
+	}
+
+	public ButtonLabel(Icon icon) {
+		super(icon);
+		init();
+	}
+
+	public ButtonLabel(String text) {
+		super(text);
+		init();
+	}
+
+	public ButtonLabel(Action a) {
+		super(a);
+		init();
+	}
+
+	public ButtonLabel(String text, Icon icon) {
+		super(text, icon);
+		init();
+	}
+	
+	private void init() {
+		setBorder(BorderFactory.createEmptyBorder());
+		setBorderPainted(false);  
+		setContentAreaFilled(false);  
+		setFocusPainted(false);  
+		setOpaque(false);
+	}
+
+}