#### Polygon Button

Hey everyone,

After looking around for 2 days I succeeded in making a hexagon button! It reacts fine except for one thing:

If you mouse-over the polygon it re-draws the shape with a small offset on the x/y making it appear double! I have no clue what is causing this since i've overridden practically every method:

Code:
import javax.swing.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import java.awt.*;
import java.awt.event.*;
public class Hexaton extends JButton implements MouseListener {
private int x, y,l;
private Polygon shape;
private Color kleur;

public Hexaton(int x, int y, int length){
//this.setSize(width,height);
this.shape = new Polygon();
this.x = x;
this.y = y;
this.l = length;
this.initialize();
//this.init2();

}

public void initialize(){
Point p1, p2, p3, p4, p5, p6;
p1 = new Point(x+(int)(Math.abs(Math.sin(60))*l),y);
p2 = new Point(p1.x+l, p1.y);
p3 = new Point(p2.x+(int)(Math.abs(Math.sin(60))*l), p2.y+(int)(Math.abs(Math.cos(60))*l));
p4 = new Point(p3.x-(int)(Math.abs(Math.sin(60))*l), p3.y+(int)(Math.abs(Math.cos(60))*l));
p5 = new Point(p4.x-l, p4.y);
p6 = new Point(p5.x-(int)(Math.abs(Math.sin(60))*l), p5.y-(int)(Math.abs(Math.cos(60)*l)));

System.out.println("Coordinates: "+"("+p1.x+","+p1.y+"), "+"("+p2.x+","+p2.y+"), "+"("+p3.x+","+p3.y+"), "
+"("+p4.x+","+p4.y+"), "+"("+p5.x+","+p5.y+"), "+"("+p6.x+","+p6.y+"), ");

System.out.println("Cos: "+Math.abs(Math.cos(60)*l));
System.out.println("Sin: "+Math.abs(Math.sin(60)*l));

setBorder(null);
setBounds(shape.getBounds());
setPreferredSize(new Dimension((int)shape.getBounds().getMaxX(), (int)shape.getBounds().getMaxX()));
}

public boolean contains(int x, int y) {
return this.shape.contains(x, y);
}
public void paintBorder(Graphics g){
g.setColor(Color.WHITE);
g.drawPolygon(shape);
}
protected void paintComponent(Graphics g) {
super.paintComponents(g);
Graphics2D gCopy = (Graphics2D) g.create();

//gCopy.setColor(Color.RED);
//gCopy.fillPolygon(this.shape);

}

@Override
public void mouseClicked(MouseEvent arg0) {
// TODO Auto-generated method stub

}

@Override
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub

}

@Override
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub

}

@Override
public void mousePressed(MouseEvent arg0) {
// TODO Auto-generated method stub

}

@Override
public void mouseReleased(MouseEvent arg0) {
// TODO Auto-generated method stub

}
}
Any pointers would be greatly appreciated!