private void initCargoPanel() {

		Object[] columnNames = { "Name", "Size", "Pickup Location", "Delivery Location", "Available At",
				"Required By" };
		cargoTableModel = new DefaultTableModel(columnNames, 0);
		cargoTableModel.addTableModelListener(this);
		cargoTable = new JTable(cargoTableModel) {

			private static final long serialVersionUID = 1L;

			@SuppressWarnings({ "unchecked", "rawtypes" })
			@Override
			public Class getColumnClass(int column) {
				switch (column) {
				case 1:
					return Integer.class;
				case 4:
					return Integer.class;
				case 5:
					return Integer.class;
				default:
					return String.class;
				}
			}

			// Select all contents of the cell without overriding cell
			// validation
			@Override
			public Component prepareEditor(TableCellEditor editor, int row,
					int column) {
				Component c = super.prepareEditor(editor, row, column);
				if (c instanceof JTextComponent) {
					final JTextComponent jtc = (JTextComponent) c;
					jtc.requestFocus();
					SwingUtilities.invokeLater(new Runnable() {
						public void run() {
							jtc.selectAll();
						}
					});
				}
				return c;
			}
		};
		cargoTable.setRowHeight(25);
		cargoTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		cargoTable.getTableHeader().setReorderingAllowed(false);

		comboBoxModel = new DefaultComboBoxModel<Location>(
				new Vector<Location>(controller.getLocations()));

		for (int i = 0; i < columnNames.length; i++) {
			TableColumn col = cargoTable.getColumnModel().getColumn(i);
			if ((i == PICKUP_LOCATION_COLUMN_INDEX) || (i == DELIVERY_LOCATION_COLUMN_INDEX)) {
				JComboBox<Location> locCombo = new JComboBox<Location>(
						comboBoxModel);
				col.setCellEditor(new DefaultCellEditor(locCombo));
			}
		}

		addCargo = new JButton("Add Cargo");
		addCargo.addActionListener(this);

		removeCargo = new JButton("Remove Cargo");
		removeCargo.addActionListener(this);

		JPanel southPanel = new JPanel(new GridLayout(1, 2));
		southPanel.add(addCargo);
		southPanel.add(removeCargo);

		JLabel cargoInfoLabel = new JLabel("Cargo Information:");

		add(cargoInfoLabel, BorderLayout.NORTH);
		add(new JScrollPane(cargoTable), BorderLayout.CENTER);
		add(southPanel, BorderLayout.SOUTH);
	}