public ClassOptionSelectionPanel(Class<?> requiredType,
                                     String initialCLIString, String nullString) {
        // Class<?>[] classesFound = AutoClassDiscovery.findClassesOfType("moa",
        // requiredType);
        Class<?>[] classesFound = findSuitableClasses(requiredType);
        this.classChoiceBox = new JComboBox(classesFound);
        setLayout(new BorderLayout());
        add(this.classChoiceBox, BorderLayout.NORTH);
        Object initialObject = null;
        try {
            initialObject = ClassOption.cliStringToObject(initialCLIString,
                    requiredType, null);
        } catch (Exception ignored) {
            // ignore exception
        }
        if (initialObject != null) {
            this.classChoiceBox.setSelectedItem(initialObject.getClass());
            classChoiceChanged(initialObject);
        } else {
            try {
                Object chosen = ((Class<?>) ClassOptionSelectionPanel.this.classChoiceBox
                        .getSelectedItem()).newInstance();
                classChoiceChanged(chosen);
            } catch (Exception ex) {
                GUIUtils.showExceptionDialog(ClassOptionSelectionPanel.this,
                        "Problem", ex);
            }
        }
        this.classChoiceBox.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                try {
                    Object chosen = ((Class<?>) ClassOptionSelectionPanel.this.classChoiceBox
                            .getSelectedItem()).newInstance();
                    classChoiceChanged(chosen);
                } catch (Exception ex) {
                    GUIUtils.showExceptionDialog(
                            ClassOptionSelectionPanel.this, "Problem", ex);
                }
            }
        });
    }