Note that you should override a JPanel's or JComponent's paintComponent(...) method, not its paint(...) method.
You've not shown us this class, and so it is hard to know what it might be doing right...