?? tryapplet.java
字號:
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*; // For the border classes
public class TryApplet extends JApplet
{
public void init()
{
Container content = getContentPane(); // Get content pane
content.setLayout(new FlowLayout(FlowLayout.RIGHT)); // Set layout
JButton button; // Stores a button
Font[] fonts = { new Font("Arial", Font.ITALIC, 10), // Two fonts
new Font("Playbill", Font.PLAIN, 14)
};
BevelBorder edge = new BevelBorder(BevelBorder.RAISED); // Bevelled border
// Add the buttons using alternate fonts
for(int i = 1; i <= 6; i++)
{
content.add(button = new JButton("Press " + i)); // Add the button
button.setFont(fonts[i%2]); // One of our own fonts
button.setBorder(edge); // Set the button border
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -