Using resource files
There are lot of hard coded numeric values inside the code. Like thresholds.
-
Use following code to access About.properties
Map<String, String> resources = Util.loadResourceBundle(Application.getAdaptor().getResourceURL("About.properties")); System.out.println(resources);
-
Inspect About.properties file in your resource directory: src/xal/app/rflearning/resources/ to understand its structure.
-
Create a new property file settings.properties in your resource directory
-
Put all hard coded values in the new file and create code to read and use them in the application