class OptionArgument extends AbstractArgument {

    private TreeMap<String, Entry> options = new TreeMap<>();


    /**
     * Constructs an OptionArgument.
     *
     * @param tool        the tool that needs this argument
     * @param name        the name of the argument
     * @param description the description of the argument
     */
    public OptionArgument(AbstractTool tool, String name, String description) {
        super(tool, name, description, null);
//        this.setClassname(new Entry("").getClass().getName());
    }

    /**
     * Adds an Option.
     *
     * @param description the description of the option
     * @param value       the value of the option
     */
    public void addOption(Object description, Object value) {
        options.put(value.toString(), new Entry(description, value));
    }

    /**
     * Gets the argument as an object.
     *
     * @return an object
     * @throws InstantiationException if the specified key cannot be compared with the keys currently in the map
     */
    public Object getArgument() throws InstantiationException {
        if (value == null) {
            return null;
        }
        try {
            return options.get(value).getValue();
        } catch (Exception e) {
            throw new InstantiationException(e.getMessage());
        }
    }

    /**
     * @return String
     * @see com.lowagie.toolbox.arguments.StringArgument#getUsage()
     */
    public String getUsage() {
        StringBuilder buf = new StringBuilder(super.getUsage());
        buf.append("    possible options:\n");
        for (Entry entry : options.values()) {
            buf.append("    - ");
            buf.append(entry.getValueToString());
            buf.append(": ");
            buf.append(entry.toString());
            buf.append('\n');
        }
        return buf.toString();
    }

    /**
     * @param evt ActionEvent
     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
     */
    public void actionPerformed(ActionEvent evt) {<FILL_FUNCTION_BODY>}

    /**
     * An Entry that can be chosen as option.
     */
    public class Entry {

        /**
         * Describes the option.
         */
        private Object description;
        /**
         * Holds the actual value of the option.
         */
        private Object value;

        /**
         * Constructs an entry.
         *
         * @param value the value of the entry (that will be identical to the description)
         */
        public Entry(Object value) {
            this.value = value;
            this.description = value;
        }

        /**
         * Constructs an entry.
         *
         * @param description the description of the entry
         * @param value       the value of the entry
         */
        public Entry(Object description, Object value) {
            this.description = description;
            this.value = value;
        }

        /**
         * String representation of the Entry.
         *
         * @return a description of the entry
         */
        public String toString() {
            return description.toString();
        }

        /**
         * Gets the value of the String.
         *
         * @return the toString of the value
         */
        public String getValueToString() {
            return value.toString();
        }

        /**
         * @return Returns the description.
         */
        public Object getDescription() {
            return description;
        }

        /**
         * @param description The description to set.
         */
        public void setDescription(Object description) {
            this.description = description;
        }

        /**
         * @return Returns the value.
         */
        public Object getValue() {
            return value;
        }

        /**
         * @param value The value to set.
         */
        public void setValue(Object value) {
            this.value = value;
        }
    }
}

        Object[] message = new Object[2];
        message[0] = "Choose one of the following options:";
        JComboBox<Entry> cb = new JComboBox<>();
        for (Entry entry : options.values()) {
            cb.addItem(entry);
        }
        message[1] = cb;
        int result = JOptionPane.showOptionDialog(
                tool.getInternalFrame(),
                message,
                description,
                JOptionPane.OK_CANCEL_OPTION,
                JOptionPane.QUESTION_MESSAGE,
                null,
                null,
                null
        );
        if (result == 0) {
            Entry entry = (Entry) cb.getSelectedItem();
            setValue(entry.getValueToString());
        }
    
<methods>public void <init>() ,public void <init>(com.lowagie.toolbox.AbstractTool, java.lang.String, java.lang.String, java.lang.Object) ,public abstract void actionPerformed(java.awt.event.ActionEvent) ,public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener) ,public java.lang.Object getArgument() throws java.lang.InstantiationException,public java.lang.String getDescription() ,public java.lang.String getName() ,public com.lowagie.toolbox.AbstractTool getTool() ,public java.lang.String getUsage() ,public java.lang.Object getValue() ,public void propertyChange(java.beans.PropertyChangeEvent) ,public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener) ,public void setDescription(java.lang.String) ,public void setName(java.lang.String) ,public void setTool(com.lowagie.toolbox.AbstractTool) ,public void setValue(java.lang.Object) ,public void setValue(java.lang.Object, java.lang.String) ,public java.lang.String toString() <variables>protected java.lang.String description,protected java.lang.String name,protected java.beans.PropertyChangeSupport pcs,protected com.lowagie.toolbox.AbstractTool tool,protected java.lang.Object value