JavaÖÐAWT¡¢SwingÓëSWTÈý´óGUI¼¼ÊõµÄÔÀíÓëЧÂʲîÒì
MineHeÔ´´
¿´ÁËһ϶ÔJava GUIÌÖÂÛµÄÌû×Ó£¬ËùÒÔдÁËһƪÎÄÕÂÀ´²ûÊöһϸ÷ÖÖGUI¼¼ÊõµÄÓÅÁÓ¡£
JavaÊÀ½çÖУ¬Ä¿Ç°×îÖªÃûµÄÈý´óGUI¿â·Ö±ðÊÇ£º
1¡¢AWT£¨Abstract Window Toolkit£©³éÏó´°¿Ú¹¤¾ß°ü¿â£¬°üº¬ÓÚËùÓеÄJava SDKÖÐ
2¡¢Swing¸ß¼¶Í¼Ðο⣬°üº¬ÓÚJava2 SDKÖÐ
3¡¢À´×ÔIBM Eclipse¿ªÔ´ÏîÄ¿µÄSWT£¨Standard Widget Toolkit£©±ê×¼´°¿Ú²¿¼þ¿â£¬²»°üº¬ÓÚJDKÖУ¬ÐèÒª´ÓEclipseµ¥¶ÀÏÂÔØ
Ò»¡¢AWTµÄÔÀí£ºÐ¡ÇÉÈ´¼òªµÄGUIϵͳ
AWT³öÏÖÓÚJava 1.xÖУ¬ÊÇJava³õÆÚËùÄÚÖõÄÒ»ÖÖÃæÏò´°¿ÚÓ¦ÓõĿ⡣AWTʹÓõļ¼ÊõÊǶԵÈÉè¼Æģʽ£¨¼´Peer£©£¬Æä½á¹¹¹Øϵ²Î¼ûÏÂͼ¡£
´ÓÕâ·ùÀà¹ØϵͼºÜÈÝÒ׿´³öAWTµÄ¼¼ÊõʵÏÖºÍPeerÉè¼Æģʽ¡£Í¼ÖУ¬»ÆÉ«µÄÀàÊÇjava.awt°üÖеÄÀ࣬dz»ÒÉ«²¿·ÖÊÇJavaÐéÄâ»ú²¿·Ö£¬¶øÉî»ÒÉ«ÔòÊÇWindowsƽ̨¡£
awtµÄÖصãÊǶԵÈPeerÉè¼Æģʽ¡£ËùνPeer¶ÔµÈÉè¼Æģʽ¾ÍÊǽ«awt¿Ø¼þÖ±½Ó¶ÔÓ¦µ½ÔËÐÐƽ̨ÉϵÄÒ»¸öÀàËÆ»òÕßµÈͬ¿Ø¼þÉÏ¡£±ÈÈçͼÖеÄButtonÀà¾ÍÊǶÔÓ¦ÁËÉî»ÒÉ«µÄWindowsµÄ±ê×¼Button¹¦ÄÜ¡£
¶ÔµÈģʽÓÃÓÚÔÚÁ½¸ö¿Ø¼þ¼äÖ®¼ä½¨Á¢Ò»¸öÏ໥×÷ÓõÄÁªÏµ£¬¶ø³äµ±Å¦´øµÄÔòÊÇJavaÐéÄâ»úºÍÐéÄâ»ú£GDIµÄ½Ó¿Ú£¨ÒÔWindowsΪÀý×Ó£©¡£ËùÒÔ£¬ÎÒÃÇ¿ÉÒÔ¿´³ö£¬awtÊ×ÏÈÐèÒª¾¹ýͨÓõÄJava¼¼ÊõÀ´¿ØÖÆͼÐΡ¢Ê¼þµÈ£¬È»ºóJavaÐéÄâ»úÔÙ½«ÇëÇó´«Ë͵½¾ßÌåµÄƽ̨ͼÐκͿؼþ½Ó¿ÚÈ¥½»»¥¡£
¶ÔµÈģʽµÄЧÂʲ¢²»ºÜ¸ß£¬ÒòΪAWTͨ¹ýÁËÐéÄâ»úºÍÐéÄâ»ú£GDIÕâÁ½¸ö²ã´ÎÀ´Íê³ÉÒ»¸ö²Ù×÷£¬¾¹ýµÄ²ã´ÎϵͳԽ¶à£¬ËٶȺÍЧÂʾÍÔ½Âý¡£¶øÇÒPeer¶ÔµÈģʽÓÐÒ»¸öÖÂÃüµÄÈõµã£ºÒÆÖ²ÐԷdz£²î£¡
Õâ¾ÍÊÇSunΪʲôҪÓÃSwingÀ´ÓÕ»óÎÒÃÇÀ뿪AWTµÄÖ÷ÒªÔÒò¡£ÒòΪ¼ÈÈ»ÊǶԵÈģʽ£¬ÄÇôAWT¾Í±ØÐëʹÓÃËùÓÐͼÐβÙ×÷ϵͳµÄͼÐνӿڹ¦ÄܵĽ»¼¯£¬ÒòΪ AWTµÄ½Ó¿ÚÖ»ÓÐÒ»Ì×£¬ËùÒÔ£¬ÎªÁ˱£Ö¤ÒÆÖ²ÐÔ£¬¾ÍÖ»ÄÜʹÓÃËùÓÐϵͳ¶¼Äܹ»Ö§³ÖµÄ×îÉÙÌØÐÔ¡£Òò¶øÎÒÃǾ³£¿ÉÒÔÌý¼ûÓÐÈ˱§Ô¹AWTµÄ¹¦ÄÜÌ«ÉÙ£¬Í¼ÐÎÌ«ÄÑ¿´µÈµÈ£¬ÕâÊÇΪÁ˱£Ö¤ÒÆÖ²ÐÔ¶ø×÷³öµÄÎþÉü¡£
¶þ¡¢ÃÍáï¾ÞÊ޵ĵ®Éú£Swing
´ÓJava2 ¼´Java 1.2°æ±¾¿ªÊ¼£¬Sun¿ªÊ¼ÔÚJDKÖÐÌṩһÌ×еÄͼÐνçÃæ½Ó¿Úϵͳ£Swing¡£ËùÓÐJava°®ºÃÕ߶¼Í¶ÈëÁ˶ÔSwingµÄÑо¿ºÍÃÔÁµ¡£Ëæ×ÅÒ»´óÅúʹÓÃSwing×÷Ϊ½çÃæ¼¼ÊõµÄIDEºÍ³ÌÐò³öÏÖ£¬ºÜ¿ì´ó¼Ò¶¼Òâʶµ½SwingµÄÎÊÌâËùÔÚ¡£
һЩÈËÈÏΪSwingÊÇÇáÁ¿¼¶µÄGUIϵͳ£¬ÎÞÂÛ¹Ù·½ÈçºÎ˵£¬Ã»ÓÐÒ»¸öJava³ÌÐòÔ±»áÈÏΪSwingÊÇÇáÁ¿¼¶µÄ£¬Ïà·´£¬SwingÊÇÒ»¸ö·Ç³£¾Þ´óµÄGUI¿â£¬ÕâÒ»µãÒѾÊÇJava½çµÄ¹²Ê¶¡£
SwingµÄһЩµ×²ãÀàÊǽèÓÃÁËAWTµÄComponent¡¢Container¡¢WindowµÈ
Ïà¹ØÎĵµ£º
¶¨ÒåÔÚÒ»¸öÀàÄÚ²¿µÄÀà½ÐÄÚ²¿À࣬°üº¬ÄÚ²¿ÀàµÄÀà³ÆΪÍⲿÀà¡£ÄÚ²¿Àà¿ÉÒÔÉùÃ÷public¡¢protected¡¢privateµÈ·ÃÎÊÏÞÖÆ£¬¿ÉÒÔÉùÃ÷ΪabstractµÄ¹©ÆäËûÄÚ²¿Àà»òÍⲿÀà¼Ì³ÐÓëÀ©Õ¹£¬»òÕßÉùÃ÷Ϊstatic¡¢finalµÄ£¬Ò²¿ÉÒÔʵÏÖÌض¨µÄ½Ó¿Ú¡£staticµÄÄÚ²¿ÀàÐÐΪÉÏÏóÒ»¸ö¶ÀÁ¢µÄÀ࣬·ÇstaticÔÚÐÐΪÉÏÀàËÆÀàµÄÊôÐÔ»ò·½·¨ÇÒ½ûÖ¹ÉùÃ÷staticµÄ·½· ......
JavaÖеĸ¡µãÊý·ÖÎö
¡¡¡¡¸¡µãÊý·ÖΪµ¥¾«¶ÈºÍË«¾«¶È,JavaÖеĵ¥¾«¶ÈºÍË«¾«¶È·Ö±ðΪfloatºÍdouble.ÄãÃÇÖªµÀfloatºÍdoubleÊÇÔõô´æ´¢µÄÂð?
¡¡¡¡floatÕ¼4¸ö×Ö½Ú,doubleÕ¼8¸ö×Ö½Ú,ΪÁË·½±ãÆð¼û,ÕâÀï¾ÍÖ»ÌÖÂÛfloatÀàÐÍ.
¡¡¡¡floatÆäʵºÍÒ»¸öintÐ͵ĴóСÊÇÒ»ÑùµÄ,Ò»¹²32λ,µÚһλ±íʾ·ûºÅ,2-9±íʾָÊý,ºóÃæ23λ±íʾСÊý²¿·Ö.ÕâÀ ......
private PreparedStatement pstmt;
String sql="INSERT INTO TABLE(id,Ãû³Æ,Óû§id,Stbid,MAC,Óû§×´Ì¬,×Ü´ÎÊý,IpµØÖ·,×ÊÁϸüÐÂʱ¼ä) " +
"VALUES(?,?,?,?,?,?,?,?,?)";
pstmt=connection.prepareStatement(sql);
pstmt.setString(1,array[0]);
......
ÈçºÎ»ñÈ¡LCDSÇëÇó¹ý³ÌÖÐJAVAÅ׳öÀ´µÄExceptionÄØ£¿ µ±flexͨ¹ýÇëÇó¶ÔÏóÇëÇó·þÎñ¶ËµÄʱºò£¬ÇëÇó³É¹¦»á·¢mx.rpc.events.ResultEventʼþ£¬Óöµ½·þÎñ¶ËÒì³£»òÆäËû·Ç200µÄHTTP״̬Â루ÀýÈç404£¬403£©Ôò»á·¢mx.rpc.events.FaultEventʼþ£¬µ«ÇëÇóʧ°ÜÊÇÒòΪʲôÔÒòÄØ£¿ÒòΪ²»Í¬µÄÔÒò¿ÉÄܵ¼Ö½çÃæÉϲ»Í ......
Ò»£º RSS½éÉÜ
¸ù¾Ýά»ù°Ù¿Æ(http://zh.wikipedia.org/wiki/RSS)µÄ¶¨Ò壬“RSSÊÇÒ»ÖÖÓÃÓÚ¹²ÏíÐÂÎźÍÆäËûWebÄÚÈݵÄÊý¾Ý½»»»¹æ·¶ ”£¬ËüÊÇһϵÁеĹ淶µÄ×éºÏ£¬²ÉÓÃXML¸ñʽ¡£Ä¿Ç°¹úÄÚRSSÓ¦ÓÃ×î¶àµÄÊÇÔÚÐÂÎÅÍøÕ¾ºÍ²©¿ÍÍøÕ¾ÉÏ¡£
Ðí¶àÍøÕ¾¿ÉÒÔÓÃRSSÔĶÁÆ÷À´¸öÐÔ»¯×Ô¼ºµÄÍøÒ³£¬±ÈÈçÏÔʾ×îеÄÐÂÀËÐÂÎÅ£¬ÏÔʾ×Ô¼ººÃÅóÓÑ ......