Code example for JList

Methods: getFont

0
                                                  final Object value, 
                                                  final int index,
                                                  final boolean isSelected,
                                                  final boolean cellHasFocus)
    { 
      final Font listFont = list.getFont();
      if (value == null) 
      { 
        setText("");
        setFont(listFont);
        return this;
      } 
 
      final String fontName = String.valueOf(value);
      setFont(listFont);
      setText(fontName);
      return this;
    } 
  }