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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

p1.addWindowListener(this);<br />

btnIkinciPencere= new Button("Ikinci Pencere");<br />

btnKapat=new Button("Kapat");<br />

p1.add(btnIkinciPencere);<br />

p1.add(btnKapat);<br />

btnKapat.addActionListener(this);<br />

btnIkinciPencere.addActionListener(this);<br />

}<br />

p1.setVisible(true);<br />

public static void main(String args[])<br />

{<br />

IlkPencere p=new IlkPencere();<br />

p.PencereAyarla("ANA PENCERE",250,100,0,0,Color.white);<br />

}<br />

public void actionPerformed(ActionEvent e)<br />

{<br />

if(e.getSource()==btnKapat)<br />

{<br />

p1.setVisible(false);<br />

}<br />

else if(e.getSource()==btnIkinciPencere)<br />

{<br />

IlkPencere p=new IlkPencere();<br />

X=X+50;<br />

Y=Y+50;<br />

p.PencereAyarla("ANA PENCERE",100,100,X,Y,Color.red);<br />

}<br />

}<br />

public void windowClosing(WindowEvent e)<br />

{<br />

System.exit(0);<br />

}<br />

public void windowOpened(WindowEvent e)<br />

{<br />

}<br />

public void windowClosed(WindowEvent e)<br />

{<br />

}<br />

public void windowIconified(WindowEvent e)<br />

{<br />

}<br />

public void windowDeiconified(WindowEvent e)<br />

{<br />

}<br />

public void windowActivated(WindowEvent e)<br />

{<br />

}<br />

public void windowDeactivated(WindowEvent e)<br />

281

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

Saved successfully!

Ooh no, something went wrong!