textfield - in java Calculator what should be coding of decimal point button ,i want to check if there is already dot in string so else add a dot in string -


if(!".".contains(jtextfield.gettext())) {     jtextfield.settext(jtextfield.gettext()+ ".");     jtextfield.setbackground(color.magenta); } else {     jtextfield.settext(jtextfield3.gettext());     jtextfield.setbackground(color.green); } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -