[kaffe] bug about graphics cache

Dalibor Topic robilad at kaffe.org
Wed Apr 27 07:48:42 PDT 2005


yinzhong shang wrote:
> import java.awt.*;
> import java.awt.event.*;
> 
> public class HelloWorld extends Frame {
>     public static void main(String[] args) throws Exception {
>         final Frame frame = new HelloWorld();
>         final Frame frame2 = new HelloWorld();
>         frame.setSize(200, 200);
>         frame2.setBounds(200, 200, 200,200);
>         frame2.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent we) {
>                     frame.dispose();
>                     frame2.dispose();
>                     System.exit(0);
>                 }
>             }
>         );
>         frame.setVisible(true);
>         frame2.setVisible(true);
>     }
> 
>     public void paint(Graphics g) {
>         g.setFont(new Font("Dialog", Font.PLAIN, 50));
>         g.setColor(Color.red);
>         g.drawString("Hello World", 150, 100);
>     }
> }
> 
> I run this simple program with kaffe-nanox, the frame2's text ("hello
> world") is not correctly displayed. the position is wrong. and I debug
> it find that it is NativeGraphics.java 's cache  problem. so i close
> the cache, and the display  then is correct.

Thanks for the bug report, yinzhong. Do you have a patch that fixes the bug?

cheers,
dalibor topic




More information about the kaffe mailing list