public void paint(Graphics g)
  {
Graphics2D g2D = (Graphics2D)g;
        Stroke tstroke = new BasicStroke(Float.parseFloat("1.0f"));
g2D.setPaint(Color.magenta); // Set the element color
g2D.setStroke(tstroke);
  }