import java.awt.*;
import javax.swing.*;
public class Coordinate extends JApplet {

 Display disegno;
 int lunghezza,larghezza;
 
 public void init(){
  disegno = new Display();  
  setContentPane(disegno);
 }
class Display extends JPanel {
 public void paintComponent(Graphics g){
   super.paintComponent(g);
   lunghezza = getSize().width;
   larghezza = getSize().height;
   g.setColor(Color.blue);
   g.fillRect(0,0,lunghezza,larghezza);
   
  }
 }
 }
