Membuat Board/ Window dengan JFrame
Run.java
package core;
/**
*
* @author Acer
*/
public class Run {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
new Window("Game Kotak");
}
}
Window.java
package core;
import java.awt.Canvas;
import javax.swing.JFrame;
/**
*
* @author Acer
*/
public class Window extends Canvas implements Runnable{
public Window(String Title){
JFrame frame=new JFrame(Title);
frame.setSize(800,600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(true);
frame.setVisible(true);
frame.add(this);
}
public void run(){
}
}
Tidak ada komentar:
Posting Komentar