Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- //Trade Goods Definition
- for (int i = 0; i < baseGoodsPrice.length; i++) {
- //id, price, qty
- tradeGoods[i] = new TradeGoods(i, baseGoodsPrice[i], 0);
- }
- setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
- //Inventory Settings
- //Line Border
- invPanel.setBorder(BorderFactory.createLineBorder(null));
- //Inventory Label
- invLabel.setText("Inventory");
- //Inventory Table
- invTable.setModel(new DefaultTableModel(
- new Object [][] {
- {tradeGoods[0].getQty(), industries[0]},
- {tradeGoods[1].getQty(), industries[1]},
- {tradeGoods[2].getQty(), industries[2]},
- {tradeGoods[3].getQty(), industries[3]},
- {tradeGoods[4].getQty(), industries[4]},
- {tradeGoods[5].getQty(), industries[5]},
- {tradeGoods[6].getQty(), industries[6]},
- {tradeGoods[7].getQty(), industries[7]},
- {tradeGoods[8].getQty(), industries[8]}
- },
- new String [] {
- "Quantity", "Goods"
- }
- ) {
- boolean[] canEdit = new boolean [] {
- false, false
- };
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- return canEdit [columnIndex];
- }
- });
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement