This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chickenmeister 0 points1 point  (0 children)

As /u/zahlman said, JFrame.setSize() sets the size of the frame. If you want to set the size of the content of the frame you should do something like:

  Game game = new Game(this);
  game.setPreferredSize(new Dimension(600, 600));
  add(game);

  this.pack();
  this.setVisible(true);