I have an
applet which allows the user to draw a polygon and display its area. If the polygon becomes self-intersecting after selecting the last point I display a JOptionPane message dialog and ignore the last point entered. However the polygon is not repainted always properly after closing the JOptionPane. Is there a way to always ensure proper repainting?