import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
class JComponent extends JFrame
{
public JComponent()
{
super("我的QQ空间");
setSize(300,200);setVisible(true);
JTabbedPane jpt=new JTabbedPane();
ImageIcon icon1=new ImageIcon("xin.gif");
ImageIcon icon2=new ImageIcon("fly.gif");
ImageIcon icon3=new ImageIcon("xin.gif");
jpt.addTab("个人档",icon1,new personerPanel());
jpt.addTab("相册",icon2,new photoPanel());
jpt.addTab("留言板",icon3,new msgPanel());
getContentPane().add(jpt);
validate();
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载