<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package mASBasic;

import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;

public class FirstApplet extends Applet {

	public void init() {
		System.out.println("this is the beginning");
		this.setSize(800,600);
		
		int globalNumber=12;
		
		System.out.println(globalNumber);
		System.out.println(this.globalNumber);
	}

	int globalNumber=10;
	
	public void paint(Graphics g) {
		//System.out.println("now i am painting");
		
		Graphics screen=this.getGraphics();
		screen.setColor(Color.blue);
		screen.drawRect(100,100,30,30);
		
		for(int i=0; i&lt;20; i++){
			int diaMeter=makeSquareValue(i);
			drawASquare(100+(i*10),100+(i*20),diaMeter);
		}
		
		//System.out.println(makeSquareValue(3));
	}
	
	int makeSquareValue(int a){
		int square=a*a;
		return square;
	}
	
	void drawASquare(int posX,int posY, int d){
		Graphics screen=getGraphics();
		screen.setColor(Color.yellow);
		screen.fillRect(posX,posY,d,d);
		screen.setColor(Color.blue);
		screen.drawRect(posX,posY,d,d);
	}
	
	
}
</pre></body></html>