addMouseListener( new MouseAdapter() { public void mousePressed(MouseEvent event) { clickPoint = event.getPoint(); repaint(); } } );
g.drawRect(0, 0, getSize().width - 1, getSize().height - 1); if (clickPoint != null) g.fillOval(clickPoint.x-RADIUS, clickPoint.y-RADIUS, RADIUS*2, RADIUS*2);