public EditEmitterDialog(javax.swing.JFrame parent) { super(parent, true); setContentPane(new PaintedPanel()); initComponents(); okBtn.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { okClicked = true; dispose(); } }); cancelBtn.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dispose(); } }); nameField.requestFocusInWindow(); Style.registerCssClasses(getContentPane(), ".rootPanel", ".configPanel"); Style.apply(getContentPane(), new Style(Res.getUrl("css/style.css"))); }
/** Returns an array containing all the tiles in the game. */ private static BufferedImage[] initialize() { BufferedImage[] toreturn = new BufferedImage[NUMBEROFCOLUMNS * NUMBEROFROWS]; for (int i = 0; i < NUMBEROFROWS; i++) for (int j = 0; j < NUMBEROFCOLUMNS; j++) toreturn[(NUMBEROFCOLUMNS * i) + j] = Res.createimage(ImagesHolder.TILES, 16 * j, 16 * i, 16, 16); return toreturn; }