Programlama | Programlama Dilleri | C Programlama Dili |C++

Hata
  • XML Parsing Error at 1:82. Error 9: Invalid character
Anasayfa Programlama Java Java'ya Ho?geldiniz 2


Java'ya Ho?geldiniz 2

AÇIKLAMA

Java'da ilk olarak yap?lan al??t?rma örneklerinin Applet versiyonlardir.

Program Kodu 1:

  1. import java.awt.*;
  2. import java.applet.*;
  3. import javax.swing.*;
  4.  
  5.  
  6. public class Welcome extends JApplet {
  7.     
  8.     public void init() {
  9.     }
  10.  
  11.     public void paint(Graphics g)
  12.     {
  13.         g.drawString("Welcome to Java!!", 25, 25 );
  14.     }
  15. }

Program Kodu 2:

  1. import java.awt.*;
  2. import java.applet.*;
  3. import javax.swing.*;
  4.  
  5.  
  6. public class WelcomeApplet1 extends JApplet {
  7.    
  8.     public void init() {
  9.     }
  10.  
  11.     public void paint(Graphics g)
  12.     {
  13.         g.drawString("Welcome to Java!!", 50, 60 );
  14.         g.drawString("This is a applet's example",50,70);
  15.     }
  16. }

Program Kodu 3:

import java.awt.*;
import java.applet.*;
import javax.swing.*;
 
 
public class WelcomeApplet2 extends Applet {
   
    public void init() {
    }
 
    public void paint(Graphics g)
     {
        g.drawLine(50,40,150,40);
        g.drawLine(50,70,150,70);
        g.drawString("Welcome to Java!!", 50, 60 );
            
   
    }
}

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
Son Güncelleme ( Cuma, 08 Nisan 2011 00:11 )  
404 Not Found

404

Not Found

The resource requested could not be found on this server!


Proudly powered by LiteSpeed Web Server

Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.