I am currently coding an application, which has an option frame JDialog
. This frame contains various checkboxes and text fields that the user can configure.
I want to save the changes the user made to the options.
What is the best way of doing so?
My first thought was implementing it by saving it in a file with the format of e.g.
checkBox1=value;
textArea1="value";
By using the following I could get the field, but I would need to do something like (for the checkbox) myField.isSelected(); which does not work.
Field myField = MyClass.class.getDeclaredField(name);
Thank you in advance.