.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
Emotions emotion = new Emotions();
emotion.setNote(jTextArea1.getText());
int emonumber = jComboBox1.getSelectedIndex();
Object[] emolist = Emotions.names.toArray();
Object[] emovalues = Emotions.values.toArray();
for (int i = 0; i < emolist.length; i++) {
String string = (String) emolist[i];
Integer value = (Integer) emovalues[i];
if (string.equals(value)) {
emotion.setEmotion(emonumber);
}
}
DataHandler.saveEmotion(emotion);
jTextArea1.setText("");
jComboBox1.setSelectedIndex(0);