Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Pencere.java
- * for AltAlta.java, click the link below:
- * http://pastebin.com/FqtaG6bC
- * Serdar KUZUCU - http://blog.asosyalbebe.com
- */
- package sedran.layoutManagers;
- import java.awt.Dimension;
- import javax.swing.JButton;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextField;
- public class Pencere extends JFrame {
- private static final long serialVersionUID = 1L;
- public static void main(String args[]) {
- new Pencere();
- }
- public Pencere() {
- super("LayoutManager Test");
- setDefaultCloseOperation(EXIT_ON_CLOSE);
- getContentPane().setLayout(new AltAlta());
- for(int i=0; i<5; i++) {
- add(new JButton("Buton " + i));
- add(new JTextField("Alan " + i));
- JLabel label = new JLabel("Etiket 1");
- label.setPreferredSize(new Dimension(200, 30));
- add(label);
- }
- pack();
- setLocationRelativeTo(null);
- setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement