private void addElemBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addElemBtnActionPerformed
        String st = elemAddField.getText().trim();
        Elem el = null;
        if (st.isEmpty() == false) {
            String type = (String) typeCbox.getSelectedItem();
            try {
                switch (type) {
                    case "String": {
                        el = new Elem(st);
                        break;
                    }
                    case "Int": {
                        el = new Elem(new Integer(Integer.valueOf(st)));
                        break;
                    }
                    case "Float": {
                        el = new Elem(new Float(Float.valueOf(st)));
                        break;
                    }
                    default:
                }
                if (el != null) {
                    if (pl.add(el)) {
                        this.statusLbl.setText("Элемент '" + el.toString() + "' добавлен");
                        elemListPane.add(new ElementPane(el));
                        elemAddField.requestFocus();
                        elemAddField.setText("");
                        elemListPane.revalidate();
                    } else {
                        statusLbl.setText("Элемент '" + el.toString() + "' не добавлен, повтор");
                       
                    }
                }
            } catch (NumberFormatException j) {
                this.statusLbl.setText("Элемент '" + st + "' не добавлен, неверный тип.");
            }

        }
    }//GEN-LAST:event_addElemBtnActionPerformed