-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
30 lines (21 loc) · 813 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.awt.Color;
import java.awt.GridLayout;
import java.time.LocalDate;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class Main {
public static void main(String[] args)
{
JFrame frame = new JFrame("Calendar");
frame.setSize(900, 500);
frame.setLocationRelativeTo(null);
frame.getContentPane().setBackground(Color.white);
JPanel mainPanel = new JPanel(new GridLayout(1,2));
LocalDate date = LocalDate.now();
Database database = new Database();
mainPanel.add(new Calendar(date.getYear(), date.getMonthValue(), date, mainPanel, database));
mainPanel.add(new Events(date, database, mainPanel));
frame.getContentPane().add(mainPanel);
frame.setVisible(true);
}
}