|
|
Re: Applet
|
Posted: Nov 10, 2005 6:24 AM
|
|
> System.out.println() prints to the Std I/O stream. > It draws nothing on the canvas of your applet. > let. include this method > for which your Applet will be looking for. > > public void paint(Graphics g) {
> //Draw a Rectangle around the applet's display area.
> g.drawRect(0, 0, size().width - 1, size().height -
> height - 1);
>
> //Draw Hello World in Rectangle
> g.drawString("Hello World", 5, 15);
> }
>
> > You may also want your HTML to specify width and > and height of your applet > > <applet code="yourApplet.class" width="600" > 600" height="400">
Ok ok, I skipped the whole class declaration. I do have paint() method in MyApplet. It still won't launch.
|
|