mypanel.java

来自「丽婴房库存销售系统 描述:C/S构架」· Java 代码 · 共 63 行

JAVA
63
字号
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 + =
减小字号Ctrl + -
显示快捷键?