Õë¶Ôjava»ÃæÉÁ˸
ÈçÌ⣡½â¾öµÄ·½·¨ÊÇÔö¼ÓÒ»¸öÐé±³¾°¡£Ö®ºó°ÑÐé±³¾°Ôö¼Óµ½ÔÀ´µÄFrameÉÏ¡£ÓÉÓÚrepaint()µ½paint()ÖмäÉæ¼°µ½update(),ËùÒÔ½â¾öÎÊÌâµÄ
¹Ø¼üÊÇÔÚÖØдupdate(),ÔÚÕâ¸ö·½·¨ÖÐʵÏÖÐé±³¾°µÄÌí¼Ó~~
@Override
public void update(Graphics g)
{
if(offScreenImage == null)
{
offScreenImage = this.createImage(800, 600);
}
/*
*¶¨ÒåÔÚÐé±³¾°ÖлµÄ“»±Ê”
*/
Graphics graOffScreen = offScreenImage.getGraphics();
/*
*ÖØ»Ðé±³¾°
*/
Color c = graOffScreen.getColor();
graOffScreen.setColor(Color.GREEN);
graOffScreen.fillRect(150, 150, 800, 600);
graOffScreen.setColor(c);
paint(graOffScreen);
g.drawImage(offScreenImage, 0, 0, null);
}
Ïà¹ØÎĵµ£º
from: http://blog.csdn.net/WOSHISUNXIANGFU/archive/2008/08/25/2828634.aspx
1.½éÉÜ
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµ ......
ÕâÀïÎÒÃÇÔÙÀí½âÁËAJAXºó£¬¿ªÊ¼À´ÓÃʵÀý¸ÐÊÜAJAXµÄÁ¦Á¿¡£
½ñÌìÎÒ×îºóҪʵÏÖµÄЧ¹û£¬µ±Êó±ê·Åµ½Í¼Æ¬ÉÏʱ»á¸ù¾Ý£¬»á°ÑÊý¾Ý¿â¿âÀïµÄÊý¾Ý¶Á³ö£¬Í¨¹ýÏÔʾ¿òÏÔʾ³öÀ´¡£Õâ¸öÔںܶàÍøÉÏÉ̵궼ÓÐÓõ½ÕâÀïЧ¹û£¬ÎÒÃÇÕâÀïÓÃAJAXÀ´ÊµÏÖÕâ¸öЧ¹û¡£Õâ¸öʵÀýÀï½áºÏÁËMySql¡¢Servlet»¹ÓÐJs£¬ÀíÂÛÐÔºÜÉÙ£¬µ«Í¨¹ýʵ¼ùÀ´¸ÐÊÜÀíÂÛ֪ʶ¡£
......
Java™ ±¾»ú½Ó¿Ú£¨Java Native Interface£¬JNI£©ÊÇÒ»¸ö±ê×¼µÄ Java API£¬ËüÖ§³Ö½« Java ´úÂëÓëʹÓÃÆäËû±à³ÌÓïÑÔ±àдµÄ´úÂëÏ༯³É¡£Èç¹ûÄúÏ£ÍûÀûÓÃÒÑÓеĴúÂë×ÊÔ´£¬ÄÇô¿ÉÒÔʹÓà JNI ×÷ΪÄú¹¤¾ß°üÖеĹؼü×é¼þ —— ±ÈÈçÔÚÃæÏò·þÎñ¼Ü¹¹£¨SOA£©ºÍ»ùÓÚÔƵÄϵͳÖС£µ«ÊÇ£¬Èç¹ûÔÚʹÓÃʱδעÒâijЩÊÂÏÔò ......
JavaµÚÈý·½library ecosystemÊÇÒ»¸öºÜ¹ãÀ«µÄ·¶³ë¡£²»¾ÃÇ°ÓÐÈË׫ÎÄ£ºÃ¿¸öÏîÄ¿ÖУ¬Äã±ØÐëÖªµÀµÄ11¸öJavaµÚÈý·½Àà¿â¡£
µ¥Ôª²âÊÔ
1.DBUnit
DBunitÊÇÒ»¸ö»ùÓÚjunitÀ©Õ¹µÄÊý¾Ý¿â²âÊÔ¿ò¼Ü¡£ËüÌṩÁË´óÁ¿µÄÀà¶ÔÓëÊý¾Ý¿âÏà¹ØµÄ²Ù×÷½øÐÐÁ˳éÏóºÍ·â×°¡£
2.MOckito
MockitoÊÇÒ»¸öÕë¶ÔJavaµÄmocking¿ò¼Ü¡£Äã¿ÉÒÔʹÓüò½àµÄAPI±àд³ö ......
package chape8;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* µÚ°ËÕ ͨÓóÌÐòÉè¼Æ
* µÚ45Ìõ£º ½«¾Ö²¿±äÁ¿µÄ×÷ÓÃÓò¼õСµ½×îС
* ½«¾Ö²¿±äÁ¿µÄ×÷ÓÃÓò×îС»¯¡£¿ÉÒÔÔöÇ¿´úÂëµÄ¿É¶ÁºÍ¿Éά»¤ÐÔ£¬²¢½µµÍ³ö´íµÄ¿ÉÄÜÐÔ
* Ҫʹ×÷ÓÃÓò×îС£¬×îÓÐÁ ......