📄 mypanel.java
字号:
package src1;
import java.awt.Color;
import java.awt.LayoutManager;
import javax.swing.JPanel;
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.*;
public class MyPanel extends JPanel {
private JLabel label;
public JButton bt;
private String title ;
private JPanel panel;
public MainForm mainForm;
public MyPanel() {
// TODO 自动生成构造函数存根
this.setSize(200,30);
this.setLayout(null);
//this.setBackground(Color.white);
//this.setBorder(new OwnBorder(2,Color.LIGHT_GRAY));
this.setVisible(true);
}
public MyPanel(MainForm mainForm)
{
this();
this.mainForm=mainForm;
}
public MyPanel(LayoutManager layout) {
super(layout);
// TODO 自动生成构造函数存根
}
public MyPanel(boolean isDoubleBuffered) {
super(isDoubleBuffered);
// TODO 自动生成构造函数存根
}
public MyPanel(LayoutManager layout, boolean isDoubleBuffered) {
super(layout, isDoubleBuffered);
// TODO 自动生成构造函数存根
}
public MyPanel(String title) {
// TODO 自动生成构造函数存根
this();
//bt = new JButton(title);
//bt.setBounds(0,0,200,30);
//label = new JLabel(title);hb hj,mb
//label.setBounds(0,0,this.getWidth(),this.getHeight());
//this.add(bt);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -