This commit is contained in:
2022-05-01 23:24:00 +08:00
parent 0b354c7561
commit 053113577f
16 changed files with 493 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/*
* Author: CHEN Yongyuan (Walter) from OOP(1007)
* Date: 2022-05-01
* Description: This is the Main Frame class.
*/
import java.awt.BorderLayout;
import javax.swing.JFrame;
public class MyFrame extends JFrame {
public MyFrame() {
setTitle("MyFrame");
setSize(400, 300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// center the frame
setLocationRelativeTo(null);
setLayout(new BorderLayout());
// my draw panel
add(new MyPanel());
setVisible(true);
}
}