📄 main.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package clock;/** * * @author Administrator */import java.awt.*;import javax.swing.*;public class Main extends JFrame { Container con; PaintClock cclock; NowTime now; public Main(String s) { super(s); this.setBounds(200, 200, 230, 230); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); cclock = new PaintClock(); now = new NowTime(); con = this.getContentPane(); con.setLayout(new BorderLayout()); con.setBackground(Color.WHITE); con.add(cclock, BorderLayout.CENTER); con.add(now, BorderLayout.NORTH); this.setLocationRelativeTo(null); this.setVisible(true); } public static void main(String[] args) { Main MyClock = new Main("时钟"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -