Time for action – window seat or full screen?

By default, your game runs in a window of its own, and the user can move this window by dragging the title bar. In this case, you should customize the title bar and specify a resolution.

  1. Copy application icons in various sizes to your project's Interface/icons directory.
  2. Add the following code in your game's main() class:
    public static void main(String[] args) { AppSettings settings = new AppSettings(true); settings.setResolution(1024,768); settings.setTitle("My Cool Game"); try { Class<Main> myclass = Main.class; settings.setIcons(new BufferedImage[]{ ImageIO.read(myclass.getResourceAsStream("/Interface/icons/SmartMonkey256.png")), ImageIO.read(myclass.getResourceAsStream("/Interface/icons/SmartMonkey128.png")), ...

Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.