?? nothelloworldpanel.java
字號(hào):
import java.awt.Container;
import java.awt.Graphics;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class NotHelloWorldPanel extends JPanel {
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawString("Java Source and Support", 75, 100);
}
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setTitle("NotHelloWorld");
frame.setSize(300, 200);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
Container contentPane = frame.getContentPane();
contentPane.add(new NotHelloWorldPanel());
frame.setVisible(true);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -