06.03.2015 Views

Java Kitabı

JAva`nın çalışma mantığıyla başlayıp basitten gelişmişe iyi bir kaynak

JAva`nın çalışma mantığıyla başlayıp basitten gelişmişe iyi bir kaynak

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

import java.awt.event.*;<br />

public class Gui_1 extends Applet implements ActionListener<br />

{<br />

TextField txtAd;<br />

TextField txtSoyad;<br />

TextArea txtAdres;<br />

Button btnYaz;<br />

Button btnSil;<br />

public void init()<br />

{<br />

setBackground(Color.white);<br />

Label lbAd=new Label("Ad ");<br />

Label lbSoyad=new Label("Soyad ");<br />

Label lbAdres=new Label("Adres ");<br />

Label lbCinsiyet=new Label("Cinsiyet ");<br />

Label lbHobi=new Label("Hobi ");<br />

txtAd=new TextField();<br />

txtSoyad=new TextField();<br />

txtAdres=new TextArea(2,5);<br />

CheckboxGroup cbCinsiyet=new CheckboxGroup();<br />

Checkbox cbInternet=new Checkbox("Internet");<br />

Checkbox cbMuzik=new Checkbox("Muzik");<br />

Checkbox cbSinema=new Checkbox("Sinema");<br />

Checkbox cbTiyatro=new Checkbox("Tiyatro");<br />

btnYaz=new Button("Yaz");<br />

btnSil=new Button("Sil");<br />

setLayout(new GridLayout(16,2));<br />

add(lbAd);<br />

add(txtAd);<br />

add(lbSoyad);<br />

add(txtSoyad);<br />

add(lbAdres);<br />

add(txtAdres);<br />

add(lbCinsiyet);<br />

add(new Checkbox("Erkek",cbCinsiyet,true));<br />

add(new Checkbox("Kadin",cbCinsiyet,false));<br />

add(lbHobi);<br />

add(cbInternet);<br />

add(cbMuzik);<br />

add(cbSinema);<br />

add(cbTiyatro);<br />

add(btnYaz);<br />

add(btnSil);<br />

261

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!