码迷,mamicode.com
首页 > 编程语言 > 详细

Java TCP Swing聊天程序

时间:2016-01-01 21:07:42      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:

 
 
业余写着玩的,好多功能没实现,有兴趣的可以拿去玩玩。图片大了还上不了,额。
下载地址 http://download.csdn.net/download/onlyxiahui/9347191 

账号 10001~10100等 
密码都是123 

客户端的入口:com.oim.app.AppStartup 
服务端的入口:com.oim.ui.MainFrame
 
标签: <无>
 

代码片段(8)[全屏查看所有代码]

1. [图片] 1.png    

技术分享

2. [图片] 2.png    

技术分享

3. [图片] 3.png    

技术分享

4. [图片] 4.jpg    

技术分享

5. [图片] 5.jpg    

技术分享

6. [图片] 6.png    

技术分享

7. [图片] 7.png    

技术分享

8. [代码][Java]代码     

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
public class AppStartup implements Runnable {
    AppContext appContext = new AppContext();
 
    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel("com.seaglasslookandfeel.SeaGlassLookAndFeel");
            // UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception ex) {
            java.util.logging.Logger.getLogger(AppStartup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        java.awt.EventQueue.invokeLater(new AppStartup());
    }
 
    @Override
    public void run() {
        long time = System.currentTimeMillis();
        LoginView loginView = appContext.getSingleView(LoginView.class);
        loginView.setVisible(true);
        System.out.println(System.currentTimeMillis() - time);
        appContext.start();
        new initApp().start();
    }
 
    class initApp extends Thread {
        @Override
        public void run() {
            long time = System.currentTimeMillis();
            initTheme();
            appContext.getSingleView(MainView.class);
            appContext.getSingleView(TrayView.class);
            appContext.getSingleView(FindView.class);
            appContext.getSingleView(AddView.class);
             
            System.out.println(System.currentTimeMillis() - time);
        }
 
        void initTheme() {
            Theme theme = (Theme) ConfigManage.get(Theme.config_file_path, Theme.class);
 
            Image imaeg = new ImageIcon(theme.getWindowBackgroundImage()).getImage();
            BufferedImage bi = new BufferedImage(imaeg.getWidth(null), imaeg.getHeight(null), BufferedImage.TYPE_INT_RGB);
 
            Graphics2D biContext = bi.createGraphics();
            biContext.drawImage(imaeg, 0, 0, null);
            bi = OnlyImageUtil.applyGaussianFilter(bi, null, theme.getGaussian());
            UIBox.put("key_window_background_image", bi);
//         
//          for (OnlyBorderFrame ourFrame : UIBox.frameSet) {
//              ourFrame.setBackgroundImage(bi);
//          }
//          for (OnlyBorderDialog ourFrame : UIBox.dialogSet) {
//              ourFrame.setBackgroundImage(bi);
//          }
        }
    }
}

Java TCP Swing聊天程序

标签:

原文地址:http://www.cnblogs.com/imsoft/p/5093693.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!