forked from dharmanshu1921/Java
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGui.java
More file actions
Latest commit
24 lines (21 loc) · 671 Bytes
/
Copy pathGui.java
File metadata and controls
24 lines (21 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
importjava.awt.BorderLayout;
importjava.awt.GridLayout;
importjavax.swing.BorderFactory;
importjavax.swing.JFrame;
importjavax.swing.JPanel;
publicclassGui {
Gui() {
JFrameframe = newJFrame();
JPanelpanel = newJPanel();
panel.setBorder(BorderFactory.createEmptyBorder(500, 500, 500, 500));
panel.setLayout(newGridLayout());
frame.add(panel, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("Frame");
frame.pack();
frame.setVisible(true);
}
publicstaticvoidmain(String[] args) {
newGui();
}
}