Class JComponentList

    • Constructor Detail

      • JComponentList

        public JComponentList()
        Initializes the list with an empty model.
      • JComponentList

        public JComponentList​(JComponentList.JComponentListModel model)
        Initializes the list with the given model.
        Parameters:
        model - the model containing the list items
    • Method Detail

      • setModel

        public void setModel​(ListModel model)
        Sets the model. Only onces of type JComponentListModel are allowed.
        Overrides:
        setModel in class JList
        Parameters:
        model - the model to set
      • main

        public static void main​(String[] args)
        Only for testing. Displays a frame with a sample JComponentList.
        Parameters:
        args - ignored