First, you really should take the recommendations already given to you in other posts - don't use getGraphics/use paintComponent rather than paint/etc... failure to take this advice will not help you...