Advertisement
Guest User

forjonas

a guest
Feb 20th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. if (jTextField1.getText().contains(".")){
  2.  
  3. }
  4. else{
  5. if(jTextField1.getText().equals("")){
  6. String current = jTextField1.getText();
  7. String New = current+"0.";
  8. jTextField1.setText(New);
  9. }
  10. else{
  11. String current = jTextField1.getText();
  12. String New = current+".";
  13. jTextField1.setText(New);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement