예제 #1
0
  private void registerListeners() {
    FocusListener focusListener =
        new FocusAdapter() {

          @Override
          public void focusLost(final FocusEvent evt) {
            updateTotalField();
          }
        };

    feePanel.addFocusListener(focusListener);

    feePanel.addActionListener(this);
    gainsPanel.addActionListener(this);

    quantityField.addFocusListener(focusListener);
    priceField.addFocusListener(focusListener);

    datePanel.getDateField().addKeyListener(keyListener);
    feePanel.addKeyListener(keyListener);
    memoField.addKeyListener(keyListener);
    priceField.addKeyListener(keyListener);
    quantityField.addKeyListener(keyListener);
    securityCombo.addKeyListener(keyListener);
    reconciledButton.addKeyListener(keyListener);
  }