Õë¶Ô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);
}
Ïà¹ØÎĵµ£º
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ ......
1.Ï̴߳´½¨µÄÁ½ÖÖ·½Ê½
1£©À©Õ¹ThreadÀಢÖØдpublic void run()·½·¨
ps£º
¶¨ÒåỊ̈߳º
class myThread extends Thread(){
public void run(){
System.out.println("Ju ......
ÔÚJAVAÖУº
1. º¯ÊýÖØÔØÊÇÒ»¸öÀàÖÐÉùÃ÷Á˶à¸öͬÃûµÄ·½·¨£¬µ«Óв»Í¬µÄ²ÎÊý¸öÊýºÍ²ÎÊýÀàÐÍ¡£
2. º¯ÊýÖع¹ÊÇÖ¸ÔÚ×ÓÀàÖÐÉùÃ÷Ó븸ÀàͬÃûµÄ·½·¨£¬´Ó¶ø¸²¸ÇÁ˸¸ÀàµÄ·½·¨¡£Öع¹½â¾öÁË×ÓÀàÓ븸ÀàµÄ²îÒìÎÊÌâ¡£
Àý×ÓÈçÏ£º
//ÖØÔØ
class A {
public d (){};
public d (q){};
public d (q,w){};
}
//ÖØд ......
¾Í¶àÏß³ÌÀ´Ëµ£¬ÎÒÃÇ¿ªÊ¼ÉèÏëÖ»ÓÐÁ½¸öỊ̈߳¨>2ʱÊDz»ÊÇËãÊýѧ¹éÄÉ·¨£¿£©ÄÇôÈç¹ûÁ½¸ö¶ÀÁ¢µÄÏ̻߳ᷢÉúʲôÄØ£¿
1¡£µ±Ò»¸öÏ߳̽øÈëmoniter£¨Ò²¾ÍÊÇ˵վÓÃÒ»¸öobject£©£¬ÁíÒ»¸öÏß³ÌÖ»Óеȴý»ò·µ»Ø£¬¶øÎÒÃÇ°Ñ·µ»Ø¾Í³ÆΪһÖÖģʽ£¬ÕâÖÖģʽµÄÓ¢ÎÄÊÇBalking¡£
2¡£ÕâÁ½¸öÏ߳̿ÉÒÔÊÇÓÐÐòµÄÖ´ÐУ¬¶ø²»ÊÇÈÃOSÀ´µ÷¶È£¬ÕâʱΠ......
Java™ ±¾»ú½Ó¿Ú£¨Java Native Interface£¬JNI£©ÊÇÒ»¸ö±ê×¼µÄ Java API£¬ËüÖ§³Ö½« Java ´úÂëÓëʹÓÃÆäËû±à³ÌÓïÑÔ±àдµÄ´úÂëÏ༯³É¡£Èç¹ûÄúÏ£ÍûÀûÓÃÒÑÓеĴúÂë×ÊÔ´£¬ÄÇô¿ÉÒÔʹÓà JNI ×÷ΪÄú¹¤¾ß°üÖеĹؼü×é¼þ —— ±ÈÈçÔÚÃæÏò·þÎñ¼Ü¹¹£¨SOA£©ºÍ»ùÓÚÔƵÄϵͳÖС£µ«ÊÇ£¬Èç¹ûÔÚʹÓÃʱδעÒâijЩÊÂÏÔò ......