package Test1;
//用于调用Test2包
import Test2.*;
import java.awt.*;
import javax.swing.*;
public class APP extends JFrame{
public static void main(String[] args) {
// TODO Auto-generated method stub
APP a = new APP();
}
public APP()
{
new Members();
}
}
package Test2;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Members extends JFrame{
public Members()
{
//设置整个窗体
setForm();
}
private void setForm()
{
//设置窗体为自由布局
setLayout(null);
this.setTitle("推箱子小游戏");
this.setSize(800, 600);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLocationRelativeTo(null);
this.setVisible(true);
}
}