http://www.oschina.net/code/snippet_935786_52805 Amateur write play, a lot of features did not realize, interested can take to play. The picture is too big to go, the amount.
http://download.csdn.net/download/onlyxiahui/9347191
Account 10001~10100, etc.
The codes are all 123.
Client Portal: Com.oim.app.AppStartup
Access to the service side: Com.oim.ui.MainFrameTags:< no >Code Snippets(8)[Full screen View all code]1.[Image]1.png2.[Image]2.png3.[Image]3.png4.[Image]4.jpg5.[Image]5.jpg6.[Image]6.png7.[Image]7.png8.[Code][Java] Code ?
| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
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 Chat Program