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

ÎÒÓÃÕâ¸ö¿´Ð§¹û£ºÒ»¸ö»ù±¾µÎJava´°¿Ú´ø°´¼ü¼ì²â

Ò»¸öJava´°¿Ú´ø°´¼ü¼ì²â£¨ÅÜJava¿ÉÊÓС³ÌÐòʱÓã©£¬沒¼ÓÐÞÊΣ¬°³×Ô¼ºÓõΡ£
package math;
import java.awt.Color;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
/**
* »ù±¾µÄ»æͼ´°¿Ú£¬»Ø³µ¹Ø±Õ´°¿Ú
*/
@SuppressWarnings("serial")
public class GraphicTest extends Frame implements KeyListener {
/**
* °´¼ü¼ì²â
*/
public void keyPressed(KeyEvent e) {
switch (e.getKeyCode()) {
case 10:
System.out.println("I am enter");
System.exit(0);
break;
case 37: // ×ó
break;
case 38: // ÉÏ
break;
case 39: // ÓÒ
break;
case 40: // ÏÂ
break;
}
this.repaint();
}
public void keyTyped(KeyEvent e) {
}
public void keyReleased(KeyEvent e) {
}
public GraphicTest() {
super("Frame-By-Lazybone");
setSize(1000, 800);
this.addKeyListener(this);
this.setVisible(true);
}
int width = 25;
int startX = 50;
int startY = 50;
int count = 25;
/** »æÖÆ·½·¨ **/
public void paint(Graphics g) {
g.setColor(Color.black);
/** »­ÆåÅÌ **/
for (int i = 1; i < count + 1; i++) {
g.drawLine(startX + i * width, width + startX, startX + i * width,
count * width + startY);
}
for (int i = 1; i < count + 1; i++) {
g.drawLine(startX + width, i * width + startY, count * width
+ startX, i * width + startY);
}
}
public static void main(String[] args) {
new GraphicTest();
}
}


Ïà¹ØÎĵµ£º

java»ñȡϵͳÊôÐÔ




ת×Ô£ºhttp://blog.csdn.net/babydavic/archive/2007/08/23/1755718.aspx
ϵͳÊôÐÔ
ÊÇÖ¸ÓëÓû§³ÌÐòÏà¹ØµÄ²Ù×÷ϵͳÅäÖÃÐÅÏ¢ÒÔ¼°Èí¼þÐÅÏ¢¡£Í¨³£ÓëÓû§³ÌÐòÏà¹ØµÄÊôÐԹؼü×Ö°üÀ¨£º
¡¡¡¡¡ñfile.separator:Îļþ·Ö¸ô·û£¬
Windows
»·¾³ÏÂΪ“"£¬
Unix
»·¾³ÏÂΪ&ldquo ......

JAVAÆóÒµÓ¦Óõķ´Ë¼ ±àд×Ô¼ºµÄÈÝÆ÷ Ãû×ֽС¶ÎϾӡ·

ΪʲôҪʹÓÃtomcat£¬jboosÕâÖÖ·þÎñÀ´ÔËÐÐÎÒÃǵĴúÂ룬Óкαػ¨Ôõô¶àÇ®ÂòIBm£¬BEAµÄ·þÎñÆ÷¡£²Ý£¨·ßÇàµÄÓïÆø£©£¬ÎÒÃÇÔÙÒ²²»¸ú±ðÈË×ß¡£
ÄѵÀÎÒÃÇ×Ô¼ºÐ´µÄ¶«Î÷¾Í²»¿É¿¿Âð£¿ÎÒÃÇ¿ª·¢ÎÒÃǵÄÏîÄ¿£¬ÐèÇóÎÒÃÇ×îÇå³þ£¬ÎÒÃÇÔõô×ö¸ÉÂﻹҪËûÃǹܣ¬SSHÊDZðÈËÌßÈ¥À´¡£
´Ó½ñÒÔºó£¬ÎÒ×Ô¼º¿ª·¢µÄjavaÆóÒµ³ÌÐò(tmd ÎÞ·¨¾ÍÊÇÇëÇó/ÏìӦģʽ ......

JavaÄÚ´æÒç³ö·ÖÀà

¹ØÓÚJavaÒç³ö·ÖÀ࣬ÎÒ¾­³£Åöµ½µÄÊÇÁ½ÀࣺһÀàÊÇjava.lang.OutOfMemoryError: Java heap space£¬Ò»ÀàÊÇjava.lang.OutOfMemoryError: PermGen space¡£
ÔÚÕâÁ½ÀàÖУ¬Ç°ÕßÅö¼ûµÄ´ÎÊý±È½ÏƵ·±¡£ÒòΪµ¼ÖÂJava heap spaceµÄÇé¿ö£¬ÓÐʱºò²¢²»ÊÇÄÚ´æ²»¹»£¬ËüÒ²»áÅ×´Ë´íÎóÐÅÏ¢¡£ÀýÈçÎÒ¾ÍÅöµ½¹ýÕâÑùµÄÇé¿ö£¬ÎÒµ±Ê±Í¨¹ýGCÈÕÖ¾·¢ÏÖ£¬ÄÚ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ