Thursday, August 11, 2011

Corruption of components in JScrollPane

I wasted over two hours trying to figure out the corruption of any component that I add to a JScrollPane whose size is a bit large (Depends on your screen resolution). The default scrollmode (BLIT_SCROLL_MODE) is the culprit here. Changing the scrollmode to a double buffering (BACKINGSTORE_SCROLL_MODE) one seems to fix the problem.