class DictionaryTableModel extends AbstractTableModel {

    /**
     * A serial version UID.
     */
    private static final long serialVersionUID = -8835275996639701776L;
    /**
     * The PDF dictionary.
     */
    protected PdfDictionary dictionary;
    /**
     * An ArrayList with the dictionary keys.
     */
    protected ArrayList<PdfName> keys = new ArrayList<>();

    /**
     * Creates the TableModel.
     *
     * @param dictionary the dictionary we want to show
     */
    public DictionaryTableModel(PdfDictionary dictionary) {
        this.dictionary = dictionary;
        this.keys.addAll(dictionary.getKeys());
    }

    /**
     * @see javax.swing.table.TableModel#getColumnCount()
     */
    public int getColumnCount() {
        return 2;
    }

    /**
     * @see javax.swing.table.TableModel#getRowCount()
     */
    public int getRowCount() {
        return dictionary.size();
    }

    /**
     * @see javax.swing.table.TableModel#getValueAt(int, int)
     */
    public Object getValueAt(int rowIndex, int columnIndex) {<FILL_FUNCTION_BODY>}

    /**
     * @see javax.swing.table.AbstractTableModel#getColumnName(int)
     */
    public String getColumnName(int columnIndex) {
        switch (columnIndex) {
            case 0:
                return "Key";
            case 1:
                return "Value";
            default:
                return null;
        }
    }

}

        switch (columnIndex) {
            case 0:
                return keys.get(rowIndex);
            case 1:
                return dictionary.get(keys.get(rowIndex));
            default:
                return null;
        }
    
<methods>public void addTableModelListener(javax.swing.event.TableModelListener) ,public int findColumn(java.lang.String) ,public void fireTableCellUpdated(int, int) ,public void fireTableChanged(javax.swing.event.TableModelEvent) ,public void fireTableDataChanged() ,public void fireTableRowsDeleted(int, int) ,public void fireTableRowsInserted(int, int) ,public void fireTableRowsUpdated(int, int) ,public void fireTableStructureChanged() ,public Class<?> getColumnClass(int) ,public java.lang.String getColumnName(int) ,public T[] getListeners(Class<T>) ,public javax.swing.event.TableModelListener[] getTableModelListeners() ,public boolean isCellEditable(int, int) ,public void removeTableModelListener(javax.swing.event.TableModelListener) ,public void setValueAt(java.lang.Object, int, int) <variables>protected javax.swing.event.EventListenerList listenerList