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

JAVA,ÈçºÎÅжϵãÊÇ·ñÔÚÃæÄÚ£¿

Ê×ÏÈÃæÒ²ÊÇÓÉһϵÁеĵã×é³É£¬±ÈÈ磬һ¸öÕý·½ÐΡ£ÎÒÃÇ¿ÉÒÔ°ÑËüµ±³ÉËĸö×ø±êµãÈ»ºóÖ±ÏßÁ¬½Ó¶ø³É¡£
java.awt.geom.GeneralPathΪÎÒÃÇʵÏÖµÄÕâ¸ö»­ÏߵŦÄÜ¡£
ÏÂÃæÓÃÒ»¸ö¼òµ¥µÄÀý×ÓÀ´»­Ò»¸öÃæ
/**
* ½«¾­Î³¶Èµã¼¯ºÏת»»ÎªGeneralPath¶ÔÏó
*
* @param points µã¼¯ºÏ(ÓÐÐò)
*
* @return GeneralPath¶ÔÏó
*/
public static GeneralPath genGeneralPath(ArrayList<Point2D.Double> points) {
   GeneralPath path = new GeneralPath();
   if (points.size() < 3) {
    return null;
   }
   path.moveTo((float) points.get(0).getX(), (float) points.get(0).getY());
   for (Iterator<Point2D.Double> it = points.iterator(); it.hasNext();) {
    Point2D.Double point = (Point2D.Double) it.next();
    path.lineTo((float) point.getX(), (float) point.getY());
   }
   path.closePath();
   return path;
}
ÆäÖС£pointsÊÇһϵÁÐ×ø±êµãµÄ¼¯ºÏ¡£ÎÒÃÇ¿ÉÒÔÓÃ
Point2D.Double point= new Point2D.Double(x,y);Éú³ÉеÄ×ø±êµã
moveTo·½·¨£ºÍ¨¹ýÒÆ¶¯µ½Ö¸¶¨µÄ×ø±êÔÚ·¾¶ÖÐÌí¼Óµã
Ö±½ÓÓÃ
lineTo:ͨ¹ý»æÖÆÒ»Ìõ´Óµ±Ç°×ø±êµ½ÐÂÖ¸¶¨×ø±êµÄÖ±ÏßÔÚ·¾¶ÖÐÌí¼Óµã¡£
ÕâÑùÿ¼ÓÒ»¸öµã¡£ÎÒÃǾÍÓÃÉÏÒ»¸öµãµ½Õâ¸öµã»­ÌõÖ±Ïß¡£ÕâÑù¾Í³É¹¦µÄ»­ºÃÁËÒ»¸öÃæÁË¡£
È»ºó£¬ÎÒÃÇÅжÁµãÊÇ·ñÔÚ¸ÃÃæÖÐ
GeneralPathÀàµÄcontains·½·¨¾Í¿ÉÒÔÁË¡£ÕæµÄ·Ç³£·½±ã


Ïà¹ØÎĵµ£º

JavaµÄÄÚ´æÐ¹Â©

JavaµÄÒ»¸öÖØÒªÓŵã¾ÍÊÇͨ¹ýÀ¬»øÊÕ¼¯Æ÷(Garbage Collection£¬GC)×Ô¶¯¹ÜÀíÄÚ´æµÄ»ØÊÕ£¬³ÌÐòÔ±²»ÐèҪͨ¹ýµ÷Óú¯ÊýÀ´ÊÍ·ÅÄÚ´æ¡£Òò´Ë£¬ºÜ¶à³ÌÐòÔ±ÈÏΪJava²»´æÔÚÄÚ´æÐ¹Â©ÎÊÌ⣬»òÕßÈÏΪ¼´Ê¹ÓÐÄÚ´æÐ¹Â©Ò²²»ÊdzÌÐòµÄÔðÈΣ¬¶øÊÇGC»òJVMµÄÎÊÌâ¡£Æäʵ£¬ÕâÖÖÏë·¨ÊDz»ÕýÈ·µÄ£¬ÒòΪJavaÒ²´æÔÚÄÚ´æÐ¹Â¶£¬µ«ËüµÄ±íÏÖÓëC++²»Í¬¡£
ÎÊÌâµÄÌá ......

ٲȻÒѾ­·ÏµôÁË£¨ÖØÐ¼ñÆðJava£©

·ÏÁË¡£2ÄêûÕý¾­ÓùýJavaÁË¡£ÎªÁ˰ïÅóÓÑæ±ØÐëÈ«²¿¼ñÆðÀ´¡£BT¼Æ»®±»ÆÈÔÝÍ£¡£
»¹ÊǺÃÄÔ×Ó²»ÈçÀñÊÍ·¡£
¼ÇÏÂÀ´£º
Java»·¾³±äÁ¿ÉèÖãº
http://blog.csdn.net/aneka/archive/2008/09/19/2948209.aspx
ѧϰ Java ¿ª·¢µÄµÚÒ»²½¾ÍÊǹ¹½¨¿ª·¢»·¾³£¬ÏÂÃæÒÔ JDK6.0 ÔÚ Windows XP ÉϵݲװÅäÖÃΪÀýÀ´½²Êö£º
µÚÒ»²½£ºÏÂÔØ JDK
´ ......

java Timer ѧϰ

TimerλÓÚjava.utilÏÂÃæ£¬Ò»°ã½ÐËûjava¼ÆÊ±Æ÷¡£
javaAPIµÄ½âÊÍÈçÏÂ:
Ò»ÖÖÏß³ÌÉèÊ©£¬ÓÃÓÚ°²ÅÅÒÔºóÔÚºǫ́Ïß³ÌÖÐÖ´ÐеÄÈÎÎñ¡£¿É°²ÅÅÈÎÎñÖ´ÐÐÒ»´Î£¬»òÕß¶¨ÆÚÖØ¸´Ö´ÐС£
ÏÈÀ´¿´¿´Ð§¹û£º
1.Éè¼Æ¼ÆÊ±Æ÷ 
import java.io.IOException;
import java.util.Calendar;
import java.util.Timer;
public class TimerTest {
......

JavaÖÐGraphicsÓ÷¨


import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
 
import javax.swing.JFrame;
import javax.swing.JPanel;
 
public class MyFrame extends JFrame {
 
         /**
       &nb ......

JavaÈçºÎÁ¬½ÓAccessÊý¾Ý¿â£¨Á½ÖÖ·½Ê½ÊµÀý´úÂ룩

import java.sql.*;
public class ConnectAccess {
/**
* ³õѧÕßÇë×¢Ò⣺
* 1:ÏȽ¨Á¢Ò»¸öaccessÎļþa1.mdb,²¢·ÅÔÚD:\ÏÂ;
* 2:ÔÚÊý¾Ý¿âÎļþa1.mdbÖн¨Á¢Ò»¸ö±íTable1£»
* 3£ºÎªTable1Ìí¼ÓÒ»ÁУ¬²¢²åÈëÖÁÉÙÒ»Ìõ¼Ç¼£»
* 4£º±¾ÎÄÊÇÒ»¸öÍêÕûµÄÀֱ࣬½ÓÄÃÈ¥ÔËÐоͿÉÒÔ¡£
*/
public static void main(Stri ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ