public void initialize ( ) { Coin balance = Main . bitcoin . wallet ( ) . getBalance ( ) ; checkState ( ! balance . isZero ( ) ) ; new BitcoinAddressValidator ( Main . params , address , sendBtn ) ; new TextFieldValidator ( amountEdit , text -> ! WTUtils . didThrow ( ( ) -> checkState ( Coin . parseCoin ( text ) . compareTo ( balance ) <= 0 ) ) ) ; amountEdit . setText ( balance . toPlainString ( ) ) ; address . setPromptText ( Address . fromKey ( Main . params , new ECKey ( ) , Main . PREFERRED_OUTPUT_SCRIPT_TYPE ) . toString ( ) ) ; }
Called by FXMLLoader