Hi there, I'm building a simple GUI calc with swing + netbeans.
I'm a little puzzled on how to organise input and output given that the screen needs to default back to 0.0 instead of just a blank bar. I need it so when you enter text the 0.0 disappears, and control when it reappears/disappears.
I've tried things like
(This will be pressing the 0 button.)
Thanks.if(txtDisplay.getText() == "0.0"){ reset(); txtDisplay.setText("0") }else{ txtDisplay.setText(txtDisplay.getText() + " 0"); }