[kaffe] kaffe and AWT on MIPS with multiple windows

Gianluca Moro giangiammy at yahoo.com
Wed Oct 5 07:46:27 PDT 2005


Hi all,

I'm working on the porting of KAFFE on MIPS platform, with
AWT and Nano-X interface.

My current problem is a helloworld program with
multiple frames: the problem is that all the drawing
is done on the first created frame: it seems thar AWT
do not keep the id of the various frame, or do not update it
or something so ...
(the code on Kaffe on PC works OK)

Anyone already found something similar?

thanks
giammy


Here the example code

import java.awt.*;
import java.awt.event.*;

public class HelloWorld extends Frame {

    String str;

    public HelloWorld (String s) {
	str = s;
    }

    public static void main(String[] args) throws Exception {
        final Frame frame = new HelloWorld("Hello1");
        final Frame frame2 = new HelloWorld("Hello2");
        final Frame frame3 = new HelloWorld("Hello3");
        frame.setSize(400, 200);
        frame2.setBounds(400, 200, 400,200);
        frame3.setBounds(200, 400, 400,200);

	frame.setTitle("111111111");
	frame2.setTitle("222222222");
	frame3.setTitle("333333333");

        frame.setVisible(true);
        frame2.setVisible(true);
        frame3.setVisible(true);
    }

    public void paint(Graphics g) {

	System.out.println("demo: paint" + this);

	g.drawLine(10,10,200,200);

        g.setFont(new Font("Dialog", Font.PLAIN, 50));
        g.setColor(Color.red);
        //g.setBackground(Color.red);

        g.drawString(str, 10, 100);
    }
}


--
Gianluca Moro             Visit  http://ilpinguino.altervista.org/
giangiammy at yahoo.com      MyBlog http://blog.libero.it/giangiammy/


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com




More information about the kaffe mailing list