bv.setLoadAllHexes(true);
    public BoardEditor(Frame frame, Board board, BoardView1 bv) {        this.frame = frame;        this.board = board;        this.bv = bv;                board.newData(0, 0, new Hex[0]);                frame.setTitle("MegaMek Editor : Unnamed");                addKeyListener(this);                canHex = new HexCanvas();        labElev = new Label("Elev:", Label.RIGHT);        texElev = new TextField("0", 1);        texElev.addActionListener(this);        texElev.addTextListener(this);        butElevUp = new Button("U");        butElevUp.addActionListener(this);        butElevDown = new Button("D");        butElevDown.addActionListener(this);            labTerrain = new Label("Terrain:", Label.LEFT);        lisTerrain = new java.awt.List(6);        lisTerrain.addItemListener(this);        refreshTerrainList();                butDelTerrain = new Button("Remove Terrain");        butDelTerrain.addActionListener(this);                choTerrainType = new Choice();        for (int i = 1; i < Terrain.SIZE; i++) {            choTerrainType.add(Terrain.getName(i));        }                texTerrainLevel = new TextField("0", 1);                butAddTerrain = new Button("Add/Set Terrain");        butAddTerrain.addActionListener(this);                panTerrainType = new Panel(new BorderLayout());        panTerrainType.add(choTerrainType, BorderLayout.WEST);        panTerrainType.add(texTerrainLevel, BorderLayout.CENTER);                cheTerrExitSpecified = new Checkbox("Set Exits : ");        butTerrExits = new Button("A");        texTerrExits = new TextField("0", 1);        butTerrExits.addActionListener(this);            panTerrExits = new Panel(new FlowLayout());        panTerrExits.add(cheTerrExitSpecified);        panTerrExits.add(butTerrExits);        panTerrExits.add(texTerrExits);        panRoads = new Panel(new FlowLayout());        cheRoadsAutoExit = new Checkbox("Exit Roads to Pavement");        cheRoadsAutoExit.addItemListener( this );        panRoads.add(cheRoadsAutoExit);        labTheme = new Label("Theme:", Label.LEFT);        texTheme = new TextField("", 15);        texTheme.addTextListener(this);        labBoard = new Label("Board:", Label.LEFT);        butBoardNew = new Button("New...");        butBoardNew.addActionListener(this);        butBoardLoad = new Button("Load...");        butBoardLoad.addActionListener(this);        butBoardLoad.setEnabled( false );        butBoardSave = new Button("Save");        butBoardSave.addActionListener(this);        butBoardSaveAs = new Button("Save As...");        butBoardSaveAs.addActionListener(this);                panButtons = new Panel(new GridLayout(2, 2, 2, 2));        panButtons.add(butBoardNew);        panButtons.add(butBoardLoad);        panButtons.add(butBoardSave);        panButtons.add(butBoardSaveAs);                blankL = new Label("", Label.CENTER);                GridBagLayout gridbag = new GridBagLayout();        GridBagConstraints c = new GridBagConstraints();        setLayout(gridbag);                c.fill = GridBagConstraints.HORIZONTAL;        c.weightx = 0.0;    c.weighty = 0.0;        c.insets = new Insets(4, 4, 1, 1);                c.gridwidth = GridBagConstraints.REMAINDER;         addBag(canHex, gridbag, c);        c.gridwidth = 1;         addBag(labElev, gridbag, c);        addBag(butElevUp, gridbag, c);        addBag(butElevDown, gridbag, c);        c.gridwidth = GridBagConstraints.REMAINDER;         addBag(texElev, gridbag, c);                addBag(labTerrain, gridbag, c);        addBag(lisTerrain, gridbag, c);        addBag(butDelTerrain, gridbag, c);        addBag(panTerrainType, gridbag, c);        addBag(panTerrExits, gridbag, c);        addBag(panRoads, gridbag, c);        addBag(labTheme, gridbag, c);        addBag(texTheme, gridbag, c);        addBag(butAddTerrain, gridbag, c);            c.weightx = 1.0;    c.weighty = 1.0;        addBag(blankL, gridbag, c);                c.weightx = 1.0;    c.weighty = 0.0;        addBag(labBoard, gridbag, c);        addBag(panButtons, gridbag, c);    }