Finalized input validation
This commit is contained in:
1 parent
8562db2a1b
commit
ed9823ceb6
4 files changed
+5
-5
No files matched your search
Binary file not shown.
@@ -5,7 +5,8 @@ Should work on any desktop operating system that can run Java 8. Designed and bu
|
||||
|
||||
Changelog:
|
||||
|
||||
- Version 0.4 Alpha - Fixes crash when calculating aspect ratio with "0" as input for width/height
|
||||
- Version 0.5 Alpha - Finalized input validation
|
||||
- Version 0.4 Alpha - Bugfix: Crash when entering 0 as width/height
|
||||
- Version 0.3 Alpha - Adds input validation for negative numbers
|
||||
- Version 0.2 Alpha - Bugfix: Crash when entering non-integer characters
|
||||
- Version 0.1 Alpha - Initial Release
|
||||
@@ -24,7 +25,6 @@ TODO:
|
||||
- Add "about" section
|
||||
- Add icon to .jar (wrap executable for various OSes)?
|
||||
- Add dark mode style inside of error messages
|
||||
- Evaluate whether logic to reject numbers that are too large is needed
|
||||
|
||||
Screenshots:
|
||||
|
||||
|
||||
Binary file not shown.
@@ -165,19 +165,19 @@ public class AARC {
|
||||
if(widthIsBad == true && heightIsBad == true) {
|
||||
|
||||
// Display error message with formatted title
|
||||
JOptionPane.showMessageDialog(null, "Please enter a valid width and height. Both must be whole numbers.", "Error", JOptionPane.INFORMATION_MESSAGE);
|
||||
JOptionPane.showMessageDialog(null, "Please enter a valid width and height. Both must be whole numbers within a reasonable range of display dimensions.", "Error", JOptionPane.INFORMATION_MESSAGE);
|
||||
|
||||
}
|
||||
else if(widthIsBad == true && heightIsBad == false) {
|
||||
|
||||
// Display error message with formatted title
|
||||
JOptionPane.showMessageDialog(null, "Please enter a valid width. It must be a whole number.", "Error", JOptionPane.INFORMATION_MESSAGE);
|
||||
JOptionPane.showMessageDialog(null, "Please enter a valid width. It must be a whole number within a reasonable range of display dimensions.", "Error", JOptionPane.INFORMATION_MESSAGE);
|
||||
|
||||
}
|
||||
else if(widthIsBad == false && heightIsBad == true) {
|
||||
|
||||
// Display error message with formatted title
|
||||
JOptionPane.showMessageDialog(null, "Please enter a valid height. It must be a whole number", "Error", JOptionPane.INFORMATION_MESSAGE);
|
||||
JOptionPane.showMessageDialog(null, "Please enter a valid height. It must be a whole number within a reasonable range of display dimensions", "Error", JOptionPane.INFORMATION_MESSAGE);
|
||||
|
||||
}
|
||||
// Final valid integer testing conditional: means IF both fields are valid integers: do this
|
||||
|
||||
Reference in new issue
Block a user