Nesne Tabanlı Programlama-2 (Bahar-2016) Hafta-2/1

import java.awt.FlowLayout;

import javax.swing.*;

public class ornek2 {

	public ornek2() {
	
		JFrame jfrm = new JFrame("Ornek2");
		jfrm.setSize(300,200);
		jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jfrm.setLayout(new FlowLayout()); // yerlesim
		
		
		JButton jbtn1 = new JButton("Buton1");
		JButton jbtn2 = new JButton("Buton2");
		JButton jbtn3 = new JButton("Buton3");
		JButton jbtn4 = new JButton("Buton4");
		
		
		jfrm.add(jbtn1);
		jfrm.add(jbtn2);
		jfrm.add(jbtn3);
		jfrm.add(jbtn4);
		
		jfrm.setVisible(true);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new ornek2();
	}

}

Share