I created a game based on jpanel. When I add jpanel to jframe, it works great on both PC and Macs.
here is the class i add jpanel to jframe to:
import javax.swing.JFrame;
public class Start{
public static void main(String[] args){
JFrame f = new JFrame("Rocks");
f.setSize(600,500);
f.setResizable(false);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Board b = new Board();
f.add(b);
f.setVisible(true);
}
}
However, when I add this jpanel to the japplet, it still works fine on PC, but not on mac. In the eclipse applet tester test, the first screen draws, but it does not accept keyboard input to start the game. However, on any browser page / html the game does not load at all, and when I open the chrome java console, I see no errors.
here is the class i add jpanel to japplet to
import javax.swing.JApplet;
public class rockAppletStart extends JApplet{
public void init(){
Board b;
b = new Board();
add(b);
b.focus();
}
public void start(){}
public void stop(){}
public void destroy(){}
}
, , , . , , , .
, gamejolt.com, . , , mac .
** **
.jar . , , ... , .
http://dl.dropbox.com/u/18832480/Rocks_Source_file.jar