如果有的话是什么?
谢谢!
不用你那样 选项卡本来就具有这种特性啊
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class Operate extends JFrame {
JTabbedPane operPane;
Insert insert;
Search search;
Delete delete;
Modify modify;
Container cp=getContentPane();
public Operate(){
this.setTitle("主控界面...");
this.setBounds(300,260,400,340);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
operPane=new JTabbedPane();
Intruduction intro=new Intruduction();
insert=new Insert();
search=new Search();
delete=new Delete();
modify=new Modify();
cp.add(operPane,"Center");
operPane.add(intro,"作者信息");
operPane.add(insert,"插入信息");
operPane.add(search,"查找信息");
operPane.add(delete,"删除信息");
operPane.add(modify,"修改信息");
operPane.setToolTipTextAt(0,"Introduction");
operPane.setToolTipTextAt(1,"Insert");
operPane.setToolTipTextAt(2,"Search");
operPane.setToolTipTextAt(3,"Delete");
operPane.setToolTipTextAt(4,"Upadate");
}
public static void main(String[] arg){
Operate operate = new Operate();
operate.setVisible(true);
operate.setResizable(false);
}
}这是我以前写的一个 象 insert search...都是 JPanel 然后直接 方在上面就好了