private void onLoad(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onLoad
        toggler.setState(false);
        chooser.showOpenDialog(this);
        if (chooser.getSelectedFile() != null) {
            try (DataInputStream dis = new DataInputStream(new FileInputStream(chooser.getSelectedFile()))) {
                game.reset();
                for (;;) {
                    game.placeEntity(dis.readInt(), dis.readInt(), dis.readInt());
                }
            } catch (FileNotFoundException ex) {
                game.log(Level.WARNING, "File not found");
            } catch (EOFException ex) {
                repaint();
            } catch (IOException ex) {
                game.log(Level.SEVERE, "Error loading", ex);
            }
        }
    }//GEN-LAST:event_onLoad