📄 inner.java
字号:
/* * Inner.java * * Created on 2004年9月26日, 上午12:31 *//** * * @author litertiger */import java.awt.*;import javax.swing.*;public class Inner extends javax.swing.JApplet { /** Initializes the applet Inner */ public void init() { Container pane=getContentPane(); pane.setLayout(new FlowLayout()); pane.add(b2); initComponents(); } /** This method is called from within the init() method to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ private void initComponents() {//GEN-BEGIN:initComponents jButton1 = new javax.swing.JButton(); getContentPane().setLayout(new java.awt.FlowLayout()); jButton1.setText("one"); getContentPane().add(jButton1); }//GEN-END:initComponents // 变量声明 - 不进行修改//GEN-BEGIN:variables private javax.swing.JButton jButton1; // 变量声明结束//GEN-END:variables BlueButton b2=new Inner.BlueButton("two"); class BlueButton extends JButton{ BlueButton(String label){ super(label); this.setBackground(Color.blue); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -