public void setTreasure(Treasure tesoro) { treasureModel = tesoro; this.nombretesoro.setText(treasureModel.getName()); this.bonustesoro.setText(Integer.toString(treasureModel.getBonus())); this.tipotesoro.setText(treasureModel.getType().toString()); repaint(); }
public void setTreasure(Treasure t) { treasureModel = t; String varname = treasureModel.getName(); name.setText(varname); setImage(varname); tipo.setText(treasureModel.getType().toString()); bonmin.setText(Integer.toString(treasureModel.getMinBonus())); bonmax.setText(Integer.toString(treasureModel.getMaxBonus())); coins.setText(Integer.toString(treasureModel.getGoldCoins())); setTitle(varname); repaint(); }