package cn.dbd;
import javax.swing.JPanel;//1.
import javax.swing.JFrame;
//游戏窗口
public class World extends JPanel { //2.
public static void main(String[] args) {
JFrame frame = new JFrame();//3.
World world = new World(); //分配窗口中的那一堆对象
world.setFocusable(true);
frame.add(world);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(641+16,479+39);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}}
标签:JFrame,JAVA,画弹,javax,JPanel,World,world,frame From: https://www.cnblogs.com/dlx609/p/17623149.html