inputverifier

DocumentListener Java, How do I prevent empty string in JTextBox?

强颜欢笑 提交于 2019-11-26 04:55:56
问题 I have been working on a personal project to get better with programming. My goal is to make it much more robust, I am just starting. I am a current computer science student. Anyway, I am working on making a portion of the program as shown. I calculates the hourly wage and provides some outputs I havent implemented yet. I\'m using DocumentListener so it it will automatically calculate. I am getting an error when the the text is removed completely from a box.I tried to fix it with the if