@Override
    public void actionPerformed(ActionEvent ae) {
        validationMess.setText("");
        validationMess.setVisible(false);
        if (ae.getActionCommand().equalsIgnoreCase("dropDown")) {
            JPanel panel = (JPanel) comboBox.getParent().getComponent(4);
            String name = comboBox.getSelectedItem().toString();
            if (ringPanel) {
                getRingDetailForName(name, panel);
            } else if (armourPanel) {
                getArmourDetailForName(name, panel);
            } else if (potionPanel) {
                getPotionDetailForName(name, panel);
            } else if (treasurePanel) {
                getTreasureDetailForName(name, panel);
            }
        }
        else {
            JButton btn = (JButton) ae.getSource();
            JPanel panel = (JPanel) btn.getParent();
            String name = ((JTextField) panel.getComponent(2)).getText();
            if (ringPanel) {
                persistRingData(name, panel);
            } else if (armourPanel) {
                persistArmourData(name, panel);
            } else if (potionPanel) {
                persistPotionData(name, panel);
            } else if (treasurePanel) {
                persistTreasure(name, panel);
            }
        }
        this.revalidate();
    }