Small problems with AWT

Tatu Saloranta tatu at
Tue Apr 25 19:27:40 PDT 2000

I have an application I've mostly developed using Blackdown's JDK.
I've tested it on Kaffe every now and then; lately Kaffe has been
improving nicely and so I can use it ok (year ago I couldn't use
Kaffe at all, nice progress IMO). There are some small things that are
either broken or work different from Sun's JDK. I'll try to see if I can
some of them, but in case someone else can work on them here it goes:

- When button's are enabled/disabled they are not redrawn.
  doesn't overload setEnabled(); it can be made to, and adding a
  repaint() there will fix the problem. Alternatively if this problem
  affects other Components too, perhaps Component could ask for
- Kaffe seems to use more stack space for (recursive) method calls.
  Not really a bug, but I noticed that certain fractal images that cause
  problems on Sun JDK gave java.lang.StackOverflowError on Kaffe.
- File dialog sizing doesn't work very well. Default size seems to
  especially as directories show full path (unlike in Sun JDK). More
  importantly, it seems that Kaffe uses fixed size (25 chars or so?)
  instead of trying to check the width of longest path. Should be
  easy to change.
  Also, extra space (when resizing dialog) is split 50% - 50%, even
  usually path names are much longer than file names.
- There is still a small bug in GridBagLayout(); it searches for the
  item in the column by counting from 0 up until it encounters an empty
  slot. If slot 0 happens to be empty it'll stop prematurely.
- pack() for Dialogs doesn't seem to calculate preferred size correctly
  (I will have to look exactly what is causing this...). Or perhaps
  is a simple constant default size (similar to FileDialog).
- Mouse move events are not combined (I think). My application listens
  to mouse dragging events, and redraws screen (which on preview-mode
  may take up to 1 second). On Sun JDK mouse events seem to be combined,
  so that I'll end up with just few events. On Kaffe things start moving
  in slow motion; I get all n+1 mouse move/drag events, repaint()
  each. I also tried to access Toolkit's default system event queue, but
  unfortunately couldn't find a way to look if there are pending mouse
  drag events (in which case I could suppress some repaint()s). I don't
  this is bug strictly speaking, but makes life much more difficult...
- AWTEvent.XX_EVENT_MASK constants seem to be defined as ints in Kaffe,
  according to Sun's java docs they should be longs. Not a problem to
  just happened to notice that when playing with system event queue.

-+ Tatu +-

More information about the kaffe mailing list