I have been developing desktop application in Java. Here, it shows how i reach string of Properties file. Key-value of String is HDI.Device.1.ID
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(HDIManagementApp.class).getContext().getResourceMap(HDIManagementView.class);String ID=resourceMap.getString("HDI.Device.1.ID");
Problem is: I don't want to call that String by-value. I want to call it by reference. Because, at the same time, I want to use Listeners for that object. If "HDI.Device.1.ID" value updates, then I will do something. `
//After changes "mystr", we inform the table model about new value
MyString mystr = new yaziyorumartik.data.MyString();
mystr.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
Object object=evt.getNewValue();
tableModel.setValueAt(object.toString(), 0, 5);
throw new UnsupportedOperationException("Not supported yet.");
}
});`
mystr.setValue(ID)
When mystr HDI.Device.1.ID in properties file updates then mystr doesn't update.