package test;
import java.io.*;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.JToggleButton;
import javax.swing.SwingConstants;
import javax.swing.JScrollBar;
import javax.swing.JTextField;
import javax.swing.JTabbedPane;
import javax.swing.JTree;
import javax.swing.JList;
import javax.swing.JOptionPane;
import java.awt.Scrollbar;
import javax.swing.JComboBox;
import java.awt.SystemColor;
import javax.swing.UIManager;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import bean.*;
import Function.common;
/**
* @author Spidy9
* @time 2019.11
* 说明:142,184行的浏览器.exe的地址需要修改成本机的地址,323行的QQ音乐.exe的地址需要修改成本机地址
*/
public class textwindow
{
private JFrame frame;
private JTextField textField;
///能够修改的基础信息
JButton btnNewButton;//头像
JLabel lblNewblacklistLabel;//昵称
JLabel lblNewblacklistLabel_1;//签名
JPanel panel_2;//联系人面板
contentPane[] friends=new contentPane[100];//好友
contentPane[] blacklist=new contentPane[100];//黑名单
int friendAmount=0,blacklistAmount=0;///好友,黑名单数量
JLabel friendLabel,blacklistLabel;
int labelHeight=28,labelWidth=301;
boolean friendState=false,blacklistState=false;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
textwindow window = new textwindow();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public textwindow() {
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize()
{
frame = new JFrame();
frame.getContentPane().setBackground(Color.WHITE);
frame.setBounds(100, 0, 320, 807);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
frame.setBackground(Color.WHITE);
/////////////////顶部窗格////////////////
///顶部背景
MyPane panel = new MyPane();
panel.file="src/data/QQ背景.jpg";
panel.setBounds(-2, 0, 308, 115);
frame.getContentPane().add(panel);
panel.setLayout(null);
//头像
btnNewButton = new JButton("New button");
//添加鼠标事件
btnNewButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
// TODO Auto-generated method stub
}
});
btnNewButton.setBounds(18, 30, 57, 60);
btnNewButton.setIcon(common.setIcon("src/data/Avatar.jpg",true));
panel.add(btnNewButton);
//昵称
lblNewblacklistLabel = new JLabel("Spidy");
lblNewblacklistLabel.setForeground(Color.RED);
lblNewblacklistLabel.setFont(new Font("华文楷体", Font.BOLD, 19));
lblNewblacklistLabel.setBounds(92, 30, 50, 22);
panel.add(lblNewblacklistLabel);
//签名版
JLabel lblNewblacklistLabel_1 = new JLabel("With more power,comes more resbonsbility");
lblNewblacklistLabel_1.setForeground(Color.DARK_GRAY);
lblNewblacklistLabel_1.setBounds(88, 64, 208, 15);
panel.add(lblNewblacklistLabel_1);
/////////////////顶部按钮//////////////////
//等级
JButton btnNewButton_1 = new JButton("Lv 49");
btnNewButton_1.setFont(new Font("SimSun", Font.PLAIN, 12));
btnNewButton_1.setBounds(140, 40, 32, 15);
btnNewButton_1.setIcon(common.setIcon("src/data/Lv.jpg",true));
panel.add(btnNewButton_1);
//空间
JButton btnNewButton_2 = new JButton("New button");
///鼠标事件
btnNewButton_2.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
try
{
Runtime ce=Runtime.getRuntime();
File file = new File("D:\\liebao\\liebao ","https:// //i.qq.com/");///注意有空格
ce.exec(file.getAbsolutePath());
}
catch(Exception e1)
{
System.out.println(e1);
}
}
});
btnNewButton_2.setBounds(68, 2, 27, 26);
btnNewButton_2.setIcon(common.setIcon("src/data/空间.png",true));
panel.add(btnNewButton_2);
//装扮
JButton btnNewButton_3 = new JButton("New button");
btnNewButton_3.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
BasicInformationWindow dressFrame=new BasicInformationWindow("src/data/装扮界面.jpg",896-50,656-40);
dressFrame.setTitle("装扮界面");
dressFrame.setVisible(true);
}
});
btnNewButton_3.setBounds(97, 2, 27, 26);
panel.add(btnNewButton_3);
btnNewButton_3.setIcon(common.setIcon("src/data/装扮.png",true));
//勋章
JButton button = new JButton("New button");
button.setBounds(127, 2, 27, 26);
button.setIcon(common.setIcon("src/data/hornor.png",true));
panel.add(button);
//邮箱
JButton button_1 = new JButton("New button");
button_1.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
try
{
Runtime ce=Runtime.getRuntime();
File file = new File("D:\\liebao\\liebao ","https:// //mail.qq.com");///注意有空格
ce.exec(file.getAbsolutePath());
}
catch(Exception e1)
{
System.out.println(e1);
}
}
});
button_1.setBounds(160, 2, 27, 26);
button_1.setIcon(common.setIcon("src/data/QQ邮箱.jpg",true));
panel.add(button_1);
//会员
JButton button_2 = new JButton("New button");
button_2.setBounds(190, 2, 27, 26);
button_2.setIcon(common.setIcon("src/data/QQ会员.png",true));
panel.add(button_2);
//状态栏
JComboBox comboBox = new JComboBox();
comboBox.setBounds(68, 83, 20, 22);
panel.add(comboBox);
//搜索面板
textField = new JTextField();
textField.setBounds(28, 113, 278, 28);
frame.getContentPane().add(textField);
textField.setColumns(10);
JButton btnNewButton_4 = new JButton("New button");
btnNewButton_4.setBounds(-2, 113, 44/10*9-3, 37/10*9);
btnNewButton_4.setIcon(common.setIcon("src/data/search.jpg",true));
frame.getContentPane().add(btnNewButton_4);
///////////////////顶部窗格完成//////////////////
///////////////////中部窗格设计//////////////////
///分类栏
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
tabbedPane.setBounds(0, 140, 306, 594);
frame.getContentPane().add(tabbedPane);
//消息面板
JPanel panel_1 = new JPanel();
panel_1.setBackground(Color.WHITE);
//panel_1.file="src/data/QQ消息示例.png";
contentPane contentPane_2=new contentPane(0,0);
contentPane_2.setPane("ming lin", "这是咋了嘛","src/data/Avatar1.jpg");
panel_1.add(contentPane_2);
contentPane contentPane_3=new contentPane(0,contentPane.height);
contentPane_3.setPane("April", "头给你打掉","src/data/Avatar2.jpg");
panel_1.add(contentPane_3);
contentPane contentPane_4=new contentPane(0,contentPane.height*2);
contentPane_4.setPane("闸总WDNMD", "Oh,NB","src/data/Avatar3.jpg");
panel_1.add(contentPane_4);
tabbedPane.addTab("消息", null, panel_1, null);
panel_1.setLayout(null);
//联系人面板
panel_2 = new JPanel();
panel_2.setBackground(Color.WHITE);
tabbedPane.addTab("联系人", null, panel_2, null);
panel_2.setLayout(null);
////////联系人面板设计/////////
//我的好友栏
friendLabel = new JLabel(" >\u6211\u7684\u597D\u53CB");
friendLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
String text=friendLabel.getText();
if(text==" >\u6211\u7684\u597D\u53CB")
{
friendLabel.setText(" ∨我的好友");
labelUpdata(1);
}
else
{
friendLabel.setText(" >我的好友");
labelUpdata(1);
没有合适的资源?快使用搜索试试~ 我知道了~
仿QQ1.0(实现联系人界面).rar
共80个文件
jpg:34个
class:20个
png:16个
1星 需积分: 45 27 下载量 87 浏览量
2019-11-22
15:53:44
上传
评论
收藏 1.05MB RAR 举报
温馨提示
详情可见https://blog.csdn.net/Spidy_harker/article/details/103201053 ,本资源的与QQ的相似程度达到8成,也实现了一些基本功能。
资源推荐
资源详情
资源评论
收起资源包目录
仿QQ1.0.rar (80个子文件)
Text
.project 380B
src
test
BasicInformationWindow.java 1KB
textwindow.java 14KB
test1.java 327B
searchFrame.java 2KB
data
QQ背景.jpg 20KB
search.jpg 729B
其他软件栏.jpg 4KB
QQ邮箱.jpg 840B
searchButton.jpg 978B
hornor.png 2KB
QQ消息示例.png 69KB
装扮界面.jpg 71KB
装扮.png 1KB
菜单栏.jpg 728B
QQ会员.png 1KB
warning.jpg 21KB
空间.png 1KB
Avatar.jpg 9KB
Avatar2.jpg 42KB
background.png 79KB
blacklist1.jpg 49KB
Avatar1.jpg 60KB
searchFrame.jpg 46KB
邮箱.png 1KB
QQ音乐.jpg 953B
QQmusic.png 1KB
添加联系人.jpg 859B
Avatar3.jpg 54KB
Lv.jpg 795B
Function
common.java 3KB
bean
contentPane.java 3KB
MyPane.java 488B
.settings
org.eclipse.jdt.core.prefs 784B
.classpath 397B
bin
test
textwindow$4.class 889B
textwindow$8.class 602B
textwindow$6.class 1012B
textwindow.class 8KB
textwindow$9.class 1KB
textwindow$1.class 804B
textwindow$7.class 1009B
searchFrame.class 2KB
textwindow$5.class 1KB
BasicInformationWindow.class 1KB
textwindow$2.class 602B
textwindow$10.class 1KB
test1.class 611B
textwindow$3.class 1KB
data
QQ背景.jpg 20KB
search.jpg 729B
其他软件栏.jpg 4KB
QQ邮箱.jpg 840B
searchButton.jpg 978B
hornor.png 2KB
QQ消息示例.png 69KB
装扮界面.jpg 71KB
装扮.png 1KB
菜单栏.jpg 728B
QQ会员.png 1KB
warning.jpg 21KB
空间.png 1KB
Avatar.jpg 9KB
Avatar2.jpg 42KB
background.png 79KB
blacklist1.jpg 49KB
Avatar1.jpg 60KB
searchFrame.jpg 46KB
邮箱.png 1KB
QQ音乐.jpg 953B
QQmusic.png 1KB
添加联系人.jpg 859B
Avatar3.jpg 54KB
Lv.jpg 795B
Function
common.class 870B
common$1.class 2KB
bean
MyPane.class 936B
contentPane$1.class 993B
contentPane$2.class 738B
contentPane.class 3KB
共 80 条
- 1
资源评论
- weixin_515567162021-12-17下载文件没有什么用Spidy_harker2022-01-07请问是哪里有问题
Spidy_harker
- 粉丝: 9602
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功