Exemplo n.º 1
0
 @Override
 public void languageChanged(Language sender) {
   btnBuyProperty.setText(sender.get("buy property"));
   btnDontBuyProperty.setText(sender.get("don't buy property"));
   beforeBuy = sender.get("prop_announce");
   refresh();
 }
Exemplo n.º 2
0
  /** Create the panel. */
  public BuyPropertyPanel(Game game) {
    super(game);
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    lblYouCanBuy = new JLabel("", SwingConstants.CENTER);
    lblYouCanBuy.setAlignmentX(Component.CENTER_ALIGNMENT);
    add(lblYouCanBuy);

    btnBuyProperty = new JButton("Buy Property");
    add(btnBuyProperty);
    btnBuyProperty.setAlignmentX(Component.CENTER_ALIGNMENT);
    btnBuyProperty.addActionListener(this);
    btnDontBuyProperty = new JButton("Don't Buy Property");
    add(btnDontBuyProperty);
    btnDontBuyProperty.setAlignmentX(Component.CENTER_ALIGNMENT);
    btnDontBuyProperty.addActionListener(this);

    Language lang = Language.getInstance();
    lang.addLanguageListener(this);
    languageChanged(lang);
  }