Programmata gia JAVA

APXIKH 1o Ergastirio 2o Ergastirio 3o Ergastirio 4o Ergastirio 5o Ergastirio 6o Ergastirio 7o Ergastirio Programma Exetastikis

ShapeDemo

import java.awt.*;
import java.applet.*;

public class ShapeDemo extends Applet{
 public void paint(Graphics g){
  g.drawRect(10,10,50,50);
  //g.fillRect(100,10,60,50);
  g.drawRoundRect(190,10,60,50,15,15);
  //g.fillRoundRect(70,90,140,100,30,40);
 
  //for(int i=10;i<=10;i++)
  // g.drawRect(200,200+i,100+5*i,100);
  Color c1=new Color(255,100,100);
  g.setColor(c1);
  g.drawOval(100,100,50,50);
  g.drawOval(190,10,90,30);
  g.fillOval(70,90,140,100);
 } 
}

Kodikas gia Applets

<HTML>

<HEAD>

<TITLE>Ένα απλό applet</TITLE>

</HEAD>

<BODY>

<APPLET CODE="(το ονομα).java"  WIDTH=500 HEIGHT=500>

</APPLET>

</BODY>

</HTML>

//Auto to kodika to grafoume sto simeiomatario kai to apothikeuoume ws html arxeio diladi  "name.html".To apothikeuoume ston idio fakelo pou einai to arxeio java//

mia mikri boitheia gia osous asxolounte me JAVA xalara...

 

 

 

 

 

 

 

 

gia oti aporia kai gia oti boitheia xreiasteite steile e-mail kai an mporoume tha sas boithisoume..