CargoBundle cargoWaiting = (CargoBundle) world.get( KEY.CARGO_BUNDLES, station.getCargoBundleNumber()); String title = "<h2 align=\"center\">" + station.getStationName() + " (" + stationTypeName + ")</h2>"; String table = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td>&nbsp;</td>\n    <td>Will pay for</td>\n    <td>Supplies<br><em>tonnes/yr</em></td><td>Waiting for pickup<br><em>tonnes</em></td>  </tr>";
CargoBundle cargoWaiting = (CargoBundle) world.get (KEY.CARGO_BUNDLES, station.getCargoBundleNumber()); String title = station.getStationName() + " (" + stationTypeName + ")";
    public void display() {                if (wi.getRowNumber() > 0) {            this.previousStation.setEnabled(true);        } else {            this.previousStation.setEnabled(false);        }                if (wi.getRowNumber() < (wi.size() - 1)) {            this.nextStation.setEnabled(true);        } else {            this.nextStation.setEnabled(false);        }                int stationNumber = wi.getIndex();        String label;        if (stationNumber != WorldIterator.BEFORE_FIRST) {            StationModel station =	    (StationModel) world.get(KEY.STATIONS, stationNumber,				     modelRoot.getPlayerPrincipal());            FreerailsTile tile = world.getTile(station.x, station.y);	    String stationTypeName = ((TrackRule) world.get(KEY.TRACK_RULES,			tile.getTrackRule(),			Player.AUTHORITATIVE)).toString();            cargoBundleIndex = station.getCargoBundleNumber();            CargoBundle cargoWaiting =            (CargoBundle) world.get(            KEY.CARGO_BUNDLES,            station.getCargoBundleNumber());            String title =            "<h2 align=\"center\">"            + station.getStationName()            + " ("            + stationTypeName            + ")</h2>";            String table =            "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td>&nbsp;</td>\n    <td>Will pay for</td>\n    <td>Supplies<br><em>tonnes/yr</em></td><td>Waiting for pickup<br><em>tonnes</em></td>  </tr>";            for (int i = 0; i < world.size(KEY.CARGO_TYPES); i++) {                                //get the values                CargoType cargoType = (CargoType) world.get(KEY.CARGO_TYPES, i);                String demanded =                (station.getDemand().isCargoDemanded(i) ? "Yes" : "No");                int amountSupplied = station.getSupply().getSupply(i);                String supply =                (amountSupplied > 0)                ? String.valueOf(amountSupplied)                : "&nbsp;";                int amountWaiting = cargoWaiting.getAmount(i);                String waiting =                (amountWaiting > 0)                ? String.valueOf(amountWaiting)                : "&nbsp;";                                //build the html                table += "<tr>";                table += "<td>" + cargoType.getDisplayName() + "</td>";                table += "<td>" + demanded + "</td>";                table += "<td>" + supply + "</td>";                table += "<td>" + waiting + "</td>";                table += "</tr>";                            }            table += "</table>";            label = "<html>" + title + table + "</html>";        } else {            cargoBundleIndex = WorldIterator.BEFORE_FIRST;            label =            "<html><h2 align=\"center\">No Station "            + "Selected</h2></html>";        }        jLabel1.setText(label);        this.repaint();    }