Yes you can put the value from two JTextField
s to the HashMap
lm by using this code.
String key=keyTextField.getText();//This will retrieve the value of JTextField keyTextField and store it to the String variable key.
String value=valueTextField.getText();
hashMap.put(key,value);//This will store the value variable with identifier variable key into the HashMap hashMap.
You can use this to get the value from the HashMap
.
String value=hashMap.get(key);//It retrieves the value from hashMap with specific identifier key and stores it the String variable key.
I think this will surely help you out.