welcome: please sign in

2009-12-06 12:46:53時点のリビジョン1

メッセージを消す
location: クラスを利用する

クラスを利用する

import javax.swing.*;
import java.awt.*;

public class Game15
{
        public static void main(String[] args)
        {
                JFrame f;
                Container cp;
                Game13 p;
                
                f = new JFrame();
                f.setTitle("15game");
                f.setVisible(true);
                f.setSize(500, 500);
                f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                cp = f.getContentPane();
                p = new Game13();
                p.pSize = 80;
                p.nx = 6;
                p.ny = 5;
                p.imgfile = "test.jpg";
                p.shokika();
                cp.add(p);
        }
}