桌球小游戏
package com.bjsxt;
import java.awt.*;
import javax.swing.*;
public class BalllGame extends JFrame{
Image ball =Toolkit.getDefaultToolkit().getImage("images/ball.png");
Image desk=Toolkit.getDefaultToolkit().getImage("images/desk.png");
double x=200;
double y=200;
double degree=3.14/3;
//加载小球和桌面
public void paint(Graphics g) {
System.out.println("窗口被画了一次!");
g.drawImage(desk, 0, 0, null);
g.drawImage(ball, (int) x, (
桌球小游戏最先出现在Python成神之路。
共有 0 条评论