if (isSelected) {
g.setColor(Color.GREEN);
}
// Draw the shape
Line2DExt l1= new Line2DExt(new Point2DExt(location.x-10,location.y-10),new Point2DExt(location.x+10,location.y+10));
Line2DExt l2= new Line2DExt(new Point2DExt(location.x-10,location.y+10),new Point2DExt(location.x+10,location.y-10));
Stroke previousStroke = g.getStroke();
g.setStroke(new BasicStroke(6,BasicStroke.CAP_ROUND,BasicStroke.JOIN_MITER));
g.draw(l1);