Created
March 1, 2019 15:42
-
-
Save SametSahin10/8c2883678012e3cb24a4161e0a89d0bd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class JavaApplication105 { | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) { | |
JFrame frame = new JFrame("Example"); | |
frame.setVisible(true); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.setSize(800, 600); | |
frame.setLocationRelativeTo(null); | |
JPanel panel = new JPanel(); | |
panel.setLayout(new GridLayout(3, 3)); | |
panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); | |
JLabel label1 = new JLabel(); | |
JLabel label2 = new JLabel(); | |
JLabel label3 = new JLabel(); | |
JLabel label4 = new JLabel(); | |
JLabel label5 = new JLabel(); | |
JLabel label6 = new JLabel(); | |
JLabel label7 = new JLabel(); | |
JLabel label8 = new JLabel(); | |
JLabel label9 = new JLabel(); | |
panel.add(label1); | |
panel.add(label2); | |
panel.add(label3); | |
panel.add(label4); | |
panel.add(label5); | |
panel.add(label6); | |
panel.add(label7); | |
panel.add(label8); | |
panel.add(label9); | |
frame.add(panel); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment