Nesne Tabanlı Programlama-2 (Bahar-2016) Hafta-2/1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
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(); } } |