Kann mir jemand bitte erklären weshalb ich eine NullPointerException in der Zeile:
hash.put(mlm.getFileAt(idx), emotionBox.getSelectedItem());
Die Zwei Werte sind sicher nicht null, es muss an der Hashtable liegen, kann mir aber nicht erklären weshalb.
bei folgendem Code:
public Hashdemo(){
Hashtable hash = new Hashtable();
}
public void actionPerformed(ActionEvent e){
index = playlist.getSelectedIndex();
if (label.equals("hash")) {
hash.put(mlm.getFileAt(idx), emotionBox.getSelectedItem());
}
}
Danke schon mal…
Grüße