List of usage examples for javax.swing JRadioButton equals
public boolean equals(Object obj)
From source file:TArea.java
public void actionPerformed(ActionEvent e) { JRadioButton temp = (JRadioButton) e.getSource(); if (temp.equals(addButton)) { canvas.area1 = new Area(canvas.gp); canvas.area1.add(canvas.area2);//w w w. j av a 2 s .co m canvas.drawFlag = false; canvas.fillFlag = true; canvas.repaint(); } else if (temp.equals(subtractButton)) { canvas.area1 = new Area(canvas.gp); canvas.area1.subtract(canvas.area2); canvas.drawFlag = false; canvas.fillFlag = true; canvas.repaint(); } else if (temp.equals(intersectButton)) { canvas.area1 = new Area(canvas.gp); canvas.area1.intersect(canvas.area2); canvas.drawFlag = false; canvas.fillFlag = true; canvas.repaint(); } else if (temp.equals(exclusiveORButton)) { canvas.area1 = new Area(canvas.gp); canvas.area1.exclusiveOr(canvas.area2); canvas.drawFlag = false; canvas.fillFlag = true; canvas.repaint(); } else if (temp.equals(resetButton)) { if (canvas.drawFlag == false) { canvas.area1 = new Area(canvas.gp); canvas.drawFlag = true; canvas.fillFlag = false; canvas.repaint(); } } }