Test commit from within Eclipse
[fanfix.git] / src / jexer / TCheckbox.java
index 556a11bec8e3965291ca4f2398062a46d8b208c6..b33d1f59252705042adf945af8a325bc6785c618 100644 (file)
@@ -64,13 +64,9 @@ public final class TCheckbox extends TWidget {
         final String label, final boolean checked) {
 
         // Set parent and window
-        super(parent);
+        super(parent, x, y, label.length() + 4, 1);
 
-        setX(x);
-        setY(y);
-        setHeight(1);
         this.label = label;
-        setWidth(label.length() + 4);
         this.checked = checked;
 
         setHasCursor(true);
@@ -84,8 +80,7 @@ public final class TCheckbox extends TWidget {
      * @return true if the mouse is currently on the checkbox
      */
     private boolean mouseOnCheckbox(final TMouseEvent mouse) {
-        if ((mouse != null)
-            && (mouse.getY() == 0)
+        if ((mouse.getY() == 0)
             && (mouse.getX() >= 0)
             && (mouse.getX() <= 2)
         ) {