Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java AppletÓëJava ApplicationµÄÇø±ð

 ÔÚJavaÓïÑÔÖУ¬Äܹ»¶ÀÁ¢ÔËÐеijÌÐò³ÆΪJavaÓ¦ÓóÌÐò£¨Application£©¡£JavaÓïÑÔ»¹ÓÐÁíÍâÒ»ÖÖ³ÌÐò——Applet³ÌÐò¡£Applet³ÌÐò£¨Ò²³ÆJavaС³ÌÐò£©ÊÇÔËÐÐÓÚ¸÷ÖÖÍøÒ³ÎļþÖУ¬ÓÃÓÚÔöÇ¿ÍøÒ³µÄÈË»ú½»»¥¡¢¶¯»­ÏÔʾ¡¢ÉùÒô²¥·ÅµÈ¹¦ÄܵijÌÐò¡£
     Java AppletºÍJava ApplicationÔڽṹ·½ÃæµÄÖ÷ÒªÇø±ð±íÏÖÔÚ£º
     £¨1£©ÔËÐз½Ê½²»Í¬¡£Java Applet³ÌÐò²»Äܵ¥¶ÀÔËÐУ¬Ëü±ØÐëÒÀ¸½ÓÚÒ»¸öÓÃHTMLÓïÑÔ±àдµÄÍøÒ³²¢Ç¶ÈëÆäÖУ¬Í¨¹ýÓëJava¼æÈݵÄä¯ÀÀÆ÷À´¿ØÖÆÖ´ÐС£Java ApplicationÊÇÍêÕûµÄ³ÌÐò£¬¿ÉÒÔ¶ÀÁ¢ÔËÐУ¬Ö»ÒªÓÐÖ§³ÖJavaµÄÐéÄâ»ú£¬Ëü¾Í¿ÉÒÔ¶ÀÁ¢ÔËÐжø²»ÐèÒªÆäËûÎļþµÄÖ§³Ö¡£
     £¨2£©ÔËÐй¤¾ß²»Í¬¡£ÔËÐÐJava Applet³ÌÐòµÄ½âÊÍÆ÷²»ÊǶÀÁ¢µÄÈí¼þ£¬¶øÊÇǶÔÚä¯ÀÀÆ÷ÖÐ×÷Ϊä¯ÀÀÆ÷Èí¼þµÄÒ»²¿·Ö¡£Java Application³ÌÐò±»±àÒëÒÔºó£¬ÓÃÆÕͨµÄJava½âÊÍÆ÷¾Í¿ÉÒÔʹÆä±ß½âÊͱßÖ´ÐУ¬¶øJava Applet±ØÐëͨ¹ýÍøÂçä¯ÀÀÆ÷»òÕßApplet¹Û²ìÆ÷²ÅÄÜÖ´ÐС£
     £¨3£©³ÌÐò½á¹¹²»Í¬¡£Ã¿¸öJava Application³ÌÐò±Ø¶¨º¬ÓÐÒ»¸ö²¢ÇÒÖ»ÓÐÒ»¸ömain·½·¨£¬³ÌÐòÖ´ÐÐʱ£¬Ê×ÏÈÑ°ÕÒmain·½·¨£¬²¢ÒÔ´ËΪÈë¿Úµã¿ªÊ¼ÔËÐС£º¬ÓÐmain·½·¨µÄÄǸöÀ࣬³£±»³ÆΪÖ÷À࣬Ҳ¾ÍÊÇ˵£¬Java Application³ÌÐò¶¼º¬ÓÐÒ»¸öÖ÷Àà¡£¶øApplet³ÌÐòÔòûÓк¬main·½·¨µÄÖ÷À࣬ÕâÒ²ÕýÊÇApplet³ÌÐò²»ÄܶÀÁ¢ÔËÐеÄÔ­Òò¡£¾¡¹ÜAppletûÓк¬main·½·¨µÄÖ÷À࣬µ«AppletÒ»¶¨ÓÐÒ»¸ö´Ó java.applet.AppletÅÉÉúµÄÀ࣬ËüÊÇÓÉJavaϵͳÌṩµÄ¡£
     £¨4£©Java Applet³ÌÐò¿ÉÒÔÖ±½ÓÀûÓÃä¯ÀÀÆ÷»òAppletViewerÌṩµÄͼÐÎÓû§½çÃ棬¶øJava Application³ÌÐòÔò±ØÐëÁíÍâÊéдרÓôúÂëÀ´Óª½¨×Ô¼ºµÄͼÐνçÃæ¡£
    £¨5£©Êܵ½µÄÏÞÖƲ»Í¬Java Application³ÌÐò¿ÉÒÔÉè¼Æ³ÉÄܽøÐи÷ÖÖ²Ù×÷µÄ³ÌÐò£¬°üÀ¨¶Á£¯Ð´ÎļþµÄ²Ù×÷£¬µ«ÊÇ Java Applet ¶ÔÕ¾µãµÄ´ÅÅÌÎļþ¼È²»ÄܽøÐжÁ²Ù×÷£¬Ò²²»ÄܽøÐÐд ²Ù×÷¡£È»¶ø£¬ÓÉÓÚ AppletµÄÒýÈ룬ʹWebÒ³Ãæ¾ßÓж¯Ì¬¶àýÌåЧ¹ûºÍ¿É½»»¥ÐÔÄÜ£¬ÕâʹÓÉÃûΪ³¬Îı¾¡¢ÊµÎª´¿Îı¾µÄHTMLÓïÑÔ±àд³ÉµÄWebÒ³ÃæÕæÕý¾ßÓÐÁ˳¬Îı¾¹¦ÄÜ£¬²»µ«¿ÉÒÔÏÔʾÎı¾ÐÅÏ¢£¬¶øÇÒ»¹¿ÉÒÔÓи÷ÖÖͼƬЧ¹ûºÍ¶¯Ì¬Í¼ÐÎЧ¹û£¬´Ó¶øʹҳÃæÏÔµÃÉú¶¯ÃÀÀö£»ÁíÍ⣬AppletʹWebÒ³ÃæÔö¼ÓÁË°´Å¥µÈ¹¦ÄÜ£¬´Ó¶øÔö¼ÓÁ˽»»¥ÐÔ¡£
     Java AppletºÍJava Application


Ïà¹ØÎĵµ£º

java jdk5Öз½·¨µÄÖØÔØÓëÖØд

  JavaÓïÑÔÖеĸÅÄî¾ÍÊǶ࣬Õâ»ØÓÖÓÐÁ½¸ö¸ÅÄÖØÔغÍÖØд¡£ÕâÊÇÁ½¸öиÅÄҲÊÇÁ½¸öÁî³õѧÕßÈÝÒ×»ìÏýµÄ¸ÅÄî¡£ËûÃǵĸÅÄî½ØÈ»²»Í¬£¬Ö»²»¹ý¶¼Óиö“ÖØ”×Ö£¬¾ÍÒÔΪÊǺÜÏñµÄ¡£ÏÂÃæ½âÊÍÒ»ÏÂÕâÁ½¸ö¸ÅÄ
·½·¨ÖØÔØ(overloading method) ÊÇÔÚÒ»¸öÀàÀïÃ棬·½·¨Ãû×ÖÏàͬ£¬¶ø²ÎÊý²»Í¬¡£·µ»ØÀàÐÍÄØ£¿¿ÉÒÔÏàͬҲ¿ÉÒÔ ......

java·´Éä³£¼û·½·¨

»ñÈ¡classÀà·½·¨£º
1£¬getClass 2£¬Class.forName() 3,ÓÃ.class
public Field[] getDeclaredFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐÀàÐ͵ıäÁ¿£¬²»°üÀ¨¼Ì³Ð¸¸ÀàµÄ
public Field[] getDeclaredFields(String name)
·µ»ØÌض¨Ãû×Ö
public Field[]  getFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐpublicÀàÐ͵ıäÁ¿£¬°üÀ¨¼Ì³Ð¸¸Àൠ......

treePanel json javaºǫ́

 function createTreeMenu(){//´´½¨Ò»¸öÊ÷µÄÃæ°å
 var treeMenu = new Ext.tree.TreePanel({
  lines : true,
  minSize : 150,
  border : false,
  root : new Ext.tree.AsyncTreeNode({text : 'root'}),
  loader : new Ext.tree.TreeLoader({dataUr ......

javaÎļþ²Ù×÷

 1.´´½¨Îļþ¼Ð 
File myFolderPath = new File(%%1); 
try { 
if (!myFolderPath.exists()) { 
     myFolderPath.mkdir(); 


catch (Exception e) { 
System.out.println("н¨Ä¿Â¼²Ù×÷³ö´í"); 
e.printStackTrace();  ......

ÊÕ²Ø java×·¼ÓдÎļþµÄ·½·¨

 import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.RandomAccessFile;
/**
 * ÃèÊö£º×·¼ÓÄÚÈݵ½Îļþĩβ
 * @author Administrator
 *
 */
public class ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ