/******************************************************************************* ** ** ** @author: Thanius ** ** @version: 1.0.0 ** ** ** ** @info: Bomberman Main File ** ** ** *******************************************************************************/ package bomberman; import java.awt.Color; import java.io.IOException; import javax.swing.JFrame; import static javax.swing.WindowConstants.EXIT_ON_CLOSE; public class Bomberman extends JFrame { private static final long serialVersionUID = 1L; public static void main(String[] args) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(JFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } java.awt.EventQueue.invokeLater(() -> { JFrame bomberman = new JFrame(); Game game = null; try { game = new Game(); } catch (IOException ex) { } bomberman.setSize(800, 600); bomberman.setResizable(false); bomberman.setBackground(Color.BLACK); bomberman.setFocusable(true); bomberman.setLocationRelativeTo(null); bomberman.setDefaultCloseOperation(EXIT_ON_CLOSE); bomberman.setTitle("Bomberman v.1.0.0 - created by Thanius"); bomberman.add(game); bomberman.setVisible(true); game.requestFocusInWindow(); }); } }