-
-
Save uncoded-ro/8c15fb56a9f0f05ce8b231ee09e3e297 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 GridLayoutApp { | |
public static void main(String args[]) { | |
JFrame container = new JFrame("Grid Layout"); | |
container.setLayout(new GridLayout(2, 2)); | |
container.setLocation(100, 100); | |
container.add(new JButton("Buton 1")); | |
container.add(new JButton("Buton 2")); | |
container.add(new JButton("Buton 3")); | |
container.add(new JButton("Buton 4")); | |
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