I have an application that implements JTree and populates the tree with the default java properties file; Nodes are keys, and values ββare the contents of node. The application was designed to be dynamic, so JButton and JTextField are implemented to enter new values ββand put the values ββin existing keys in the properties file.
So, for example, I have the line below as the default in the sample.properties file
node = cat, dog, mouse
and using JTextField and JButton I, enter βrabbitβ to add to node to look like this:
node = cat, dog, mouse, rabbit
I implemented JTextField and JButton and made them work, but I just can't find a good way to add new values ββto existing keys in the properties file.
source
share