Terminally Incoherent

Utterly random, incoherent and disjointed rants and ramblings...

Tuesday, November 29, 2005

Swing is Slow

I'm at a loss at this point... I do the following: I create IconImage using a 3 layered (RGB) BufferedImage, and I put it on a JLabel. Then I put the label on a JInternalFrame for display. I use JScrollPane for scrolling. The image is 640x640.

The image loads ok but scrolling is painfully slow. Moving over 1 tic usually takes 10-20 sec and eats up 50% of the CPU time. It also effectively freezes the Java application. WTF? Is this a case of Swing being slow? This is driving me nuts. Maybe I should I try a different windowing toolkit?

I effectively broke the code today so I won't be able to take care of that till I track down my mysterious nullpointer exception. I essentially re-organized my whole io package. I essentially broke my main file io class into 3+ different implementations, all extending an abstract template with common functionality. The mentioned old class now plays a support role, and has nothing to do with direct io. The code makes more sense now from extensibility point of view, but I broke something in the process and I still haven't figured out what it is.

I also need to get my stego shit together. It's just to much stuff to do all at once. I'm so glad text assignment is not due till next week :)


Post a Comment

Links to this post:

Create a Link

<< Home