fixed numberformat

This commit is contained in:
Johannes Schmelz 2024-12-02 06:53:18 +01:00
parent 0d885203a7
commit 96542fa42b

View File

@ -88,8 +88,10 @@ public class TradeMenu extends Dialog {
} }
private void setTrades() { private void setTrades() {
tradeHandler.setOfferedAmount(Integer.parseInt(leftCurrencyInput.getText())); String leftCurreny = leftCurrencyInput.getText().equals("")? "0" : leftCurrencyInput.getText();
tradeHandler.setRequestedAmount(Integer.parseInt(rightCurrencyInput.getText())); String rightCurreny = rightCurrencyInput.getText().equals("")? "0" : rightCurrencyInput.getText();
tradeHandler.setOfferedAmount(Integer.parseInt(leftCurreny));
tradeHandler.setRequestedAmount(Integer.parseInt(rightCurreny));
tradeHandler.setOfferedJailCards(Integer.parseInt(leftSpecialCardSelector.getSelectedItem())); tradeHandler.setOfferedJailCards(Integer.parseInt(leftSpecialCardSelector.getSelectedItem()));
tradeHandler.setRequestedJailCards(Integer.parseInt(rightSpecialCardSelector.getSelectedItem())); tradeHandler.setRequestedJailCards(Integer.parseInt(rightSpecialCardSelector.getSelectedItem()));