Created
March 25, 2020 19:53
-
-
Save sedran/36f8c5eb7f97c45bff02122efc9c8b8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pencere.java | |
* for AltAlta.java, click the link below: | |
* http://pastebin.com/FqtaG6bC | |
* Serdar KUZUCU - http://serdarkuzucu.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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment