@Override protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); shape.draw(g2, new Point(getWidth() / 2, getHeight() / 2)); }
public String getShapeId() { return shape.getClass().getName(); }