java ¶àÏß³Ì
package server;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class Bounce {
public static void main(String[] args) {
JFrame frame = new BounceFrame();
frame.setDefaultCloseOperation((JFrame.EXIT_ON_CLOSE));
frame.setVisible(true);
System.out.format("%d",2);
}
}
class Ball
{
private static final int XSIZE = 15;
private static final int YSIZE = 15;
private double x = 0;
private double y = 0;
private double dx = 1;
private double dy = 1;
public void move(Rectangle2D bounds)
{
x += dx;
y += dy;
if (x < bounds.getMinX())
{
x = bounds.getMinX();
dx = -dx;
}
if (x + XSIZE >= bounds.getMaxX())
{
x = bounds.getMaxX() - XSIZE;
dx = -dx;
}
if (y < bounds.getMinY())
{
y = bounds.getMinY();
dy = -dy;
}
if (y + YSIZE >= bounds.getMaxY())
{
y = bounds.getMaxY() - YSIZE;
dy = -dy;
}
}
public Ellipse2D getShape()
{
return new Ellipse2D.Double(x,y,XSIZE,YSIZE);
}
}
class BallPanel extends JPanel
{
private ArrayList<Ball> balls = new ArrayList<Ball>();
public void add(Ball b)
{
balls.add(b);
}
&nbs
Ïà¹ØÎĵµ£º
Ò».µã»÷ͼÊ飬չʾ¸ÃÊéµÄÏêϸÐÅÏ¢
µã»÷ͼÊé→booksÒ³Ãæ→ͨ¹ýurlÖØдdisplayBook.jsp?isbn=¸ÃÊé±àºÅ →´«ÈëdisplayBooksÒ³Ãæ→
<c:set var="isbn" value="${param.isbn}"></c:set>
<c:forEach var="currentBook" items="${sessionScope.bookTitles}">
<c:if test="${ ......
@echo off cls REM --- BEG MACHINE-DEPENDENT ---- set HOME_J2RE=C:\Program Files\Java\jdk1.5.0_17 REM --- END MACHINE-DEPENDENT ---- set HOME_JAVA=%HOME_J2RE%\bin\java set HOME_JAVA="%HOME_JAVA%" set ARG_MEMORY=-Xms128m -Xmx196m set PROP_POLICY=-Dorg.ragingcat.kst.uikeytool.policy.extende ......
¿Î³ÌÄÚÈÝ
¸ü¼ÓʵÓÿÆѧµÄJava»ù´¡¿Î³Ì
¾ßÓÐÔúʵµÄ±àÂ빦µ×ÊÇÒ»¸öJava¹¤³Ìʦ±Ø±¸µÄÄÜÁ¦£¬ÎÒÃÇÁ¦Çó´ÓѧԱ½Ó´¥JavaµÄµÚÒ»ÌìÆð¾ÍÅàÑøÆäÐγÉÕýȷ˼¿¼ÎÊÌâµÄ·½Ê½¡£ÎÒÃǵĹØ×¢µã²»½ö½öÔÚÓÚ¶Ôij¸öÀà¿â£¨API£©µÄÕÆÎÕ£¬¸ü¶àµÄÊÇÏòѧԱչʾÆóÒµÖÐÕæÕýÒªÖØÊÓµÄÎÊÌ⣬ÀýÈçÒì³£ÈçºÎ´¦Àí¡¢Ëã·¨ÈçºÎÓÅ»¯µÈ¡£Í¬Ê±£¬ÎÒÃÇ×¢ÖØÈÃѧԱÑø³ÉÁ¼ºÃµ ......
Java ¿ª·¢ÎªÊ²Ã´ÐèÒª UML
¡¡¡¡ÖªµÀ UML Ôì³ÉÁËÔõÑùµÄ¾ÖÃæ´ó»ìÂÒÂð£¿ÖªµÀʲôÑùµÄ¹¦ÄÜÊÇ UML ÓµÓе« JAVA ²»¾ß±¸µÄÂð£¿ÖªµÀÎÒÃÇΪʲôÐèÒª³ý JAVA ÍâµÄÁíÒ»ÖÖµçÄÔÓïÑÔÂð£¿UML ²¢²»½ö½öÖ»ÊÇ JAVA »òÕßÆäËüʲôÓïÑÔµÄÌæ´úÆ·¡£UML ÊÇÃæÏò¶ÔÏóµÄ·ÖÎö¼°Éè¼ÆµÄ×¢ÊÍ¡£UML ÊǶÀÁ¢ÓÚÄÇЩ´«Í³Éè¼ÆÓïÑÔÖ®ÍâµÄÒ»ÖÖÓïÑÔ¡£ÒòΪ UML ......