[kaffe] Graphics for ChessApplet

Dalibor Topic robilad@kaffe.org
Tue Nov 25 07:25:02 2003


Hi Urban,

Urban Avierfjärd wrote:
> Hi Dears
> I am developing chess game written as an JavaApplet.

cool.

> Using Borland JBuilder 9 Personal Edition.

Uagh, generated code ;)

> I use the following  Code
>  void this_mouseDragged(MouseEvent e)
>  {
> }
> class Chess_this_mouseMotionAdapter extends 
> java.awt.event.MouseMotionAdapter
> {
>      Chess adaptee ;
>          Chess_this_mouseMotionAdapter ( Chess adaptee )
>          {
>                this.adaptee = adaptee ;
>          }
>          public void mouseDragged ( MouseEvent e )
>         {
>               adaptee.this_mouseDragged ( e ) ;
>          }
> }
> But it seems that it still fire when the mouse button is released.

what version of kaffe did you test with? All I get with the current CVS is

bash-2.05a$ /tmp/topic/current-jit3/bin/appletviewer 
http://w1.201.telia.com/~u20100003/Chess.html
java.lang.NullPointerException
    at java.io.OutputStreamWriter.write (OutputStreamWriter.java:84)
    at java.io.PrintWriter.write (PrintWriter.java:542)
    at java.io.PrintWriter.write (PrintWriter.java:568)
    at java.io.PrintWriter.print (PrintWriter.java:204)
    at gnu.java.net.protocol.http.Connection.sendRequest 
(Connection.java:214)
    at gnu.java.net.protocol.http.Connection.connect (Connection.java:183)
    at gnu.java.net.protocol.http.Connection.getInputStream 
(Connection.java:433)
    at kaffe.applet.AppletViewer.main (AppletViewer.java:381)

which another bug, I guess ;)

cheers,
dalibor topic