setSize after setVisible seems to fix the drawing problem