[154] in java-interest
awt.Graphics why doesn't draw something on the screen
daemon@ATHENA.MIT.EDU (Paul Beerkens)
Tue May 30 12:43:05 1995
From: Paul Beerkens <beerkens@prl.philips.co.uk>
Date: Tue, 30 May 1995 16:21:57 +0100
To: java-interest@java.Eng.Sun.COM
import awt.Graphics;
import awt.Window;
import awt.Frame;
import awt.Color;
class GraphicsTest {
public static void main (String argv [])
{
awt.WServer MyWServer=new awt.WServer ();
MyWServer.start ();
Graphics MyGraphics;
Window MyWindow;
Frame MyFrame;
MyFrame=new Frame (MyWServer,true,false,null,300,300,Color.gray);
MyFrame.setTitle ("Graphics Test Frame");
MyWindow=new Window ( MyFrame,"Center",Color.white,200,200);
MyGraphics = new Graphics (MyWindow);
MyFrame.map ();
MyGraphics.setForeground (Color.black);
MyGraphics.fillRect (40,40,10,10);
MyGraphics.drawString ("test",10,10);
MyWindow.drawRect (10,10,40,40);
};
};
Why doesn't this program draw a Rectangle or a String in the Frame ??
Please help me out.
Paul
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com