[kaffe] Layout problems with xlib AWT backend

James Damour jdamour at nycap.rr.com
Sun Jul 25 13:48:21 PDT 2004

Before I describe the problem, I would first like to thank all of the
kaffe hackers for their dedication and hard work.  I am a developer of a
GPL'ed, networked turn-based game written in Java
(http://megamek.sf.net, an implementation of the Classic BattleTech
rules); I am very happy to report that the game *almost* runs under
FLOSS Java runtimes, including Kaffe.  I am looking forward to the day
that I can uninstall the proprietary Java runtimes from my computers and
use 100% Free Software.

Second, I apologize for not having a simple testcase for my problem. 
Part of the reason is that the problem only repeats with a complex
layout.  Another part is that I'm trying to get more FLOSS Java hackers
adicted to my game ;-)  I believe that MegaMek can be a great showpiece
for FLOSS Java, and it can help address the biggest obstical to Linux on
the desktop: lack of native games.

MegaMek uses an AWT UI, and it can run under a v1.1 Java runtime (it has
some features that borrow from more recent APIs, but it can run without
those).  As such, it is very close to being complete supported on FLOSS

One of the remaining issues is the layout of MegaMek windows (that use
the GridBagLayout) under the Kaffe xlib AWT peers.  If you grab the
latest MegaMek CVS (from http://sourceforge.net/projects/megamek),
you'll find a file named HACKING that describes how to compile and run
MegaMek with 100% Free Java tools.  If you run MegaMek with the command,
"kaffe -Xkaffe-xlib-awt  -classpath
megamek.MegaMek -log | tee MegaMek.log", you'll see a problem on the
first screen.  The image is the correct size, but all of the buttons are
squashed (like they are running off the edge of the screen).

If you launch the Map Editor (the button above the "Quit" button) and
then switch to the xterm from which you launched MegaMek, you should see
that a java.lang.NullPointerException has been thrown from

Please email me if you have any questions about these two problems, if
you need details about my system configuration (a Debian Sarge system,
and the latest Kaffe CVS HEAD), or if you'd like more information on

James Damour (Suvarov454) <suvarov454 at users.sourceforge.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://kaffe.org/pipermail/kaffe/attachments/20040725/043160d2/attachment-0002.pgp 

More information about the kaffe mailing list