-
-
Save uncoded-ro/2dfc55b2872f9c58c5a4ca7bd90c63c8 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
package ro.virtualcampus.gui; | |
import java.awt.*; | |
import javax.swing.*; | |
public class BorderLayoutApp { | |
public static void main(String args[]) { | |
JFrame container = new JFrame("Border Layout"); | |
container.setLayout(new BorderLayout()); | |
container.setLocation(100, 100); | |
container.add(new JButton("North"), BorderLayout.NORTH); | |
container.add(new JButton("South"), BorderLayout.SOUTH); | |
container.add(new JButton("East"), BorderLayout.EAST); | |
container.add(new JButton("West"), BorderLayout.WEST); | |
container.add(new JButton("Center"), BorderLayout.CENTER); | |
container.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
container.pack(); | |
container.setVisible(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment