Add ListCellRenderer

two types of object can be input in the JList: a String or an Icon.
Note: the type of listDirectory changes from String to Object.