jdk/src/java.desktop/share/classes/javax/swing/JList.java
changeset 32865 f9cb6e427f9e
parent 30464 929bafd0db6f
child 33253 78e735319356
equal deleted inserted replaced
32864:2a338536e642 32865:f9cb6e427f9e
   159  * <pre>
   159  * <pre>
   160  * {@code
   160  * {@code
   161  *  // Display an icon and a string for each object in the list.
   161  *  // Display an icon and a string for each object in the list.
   162  *
   162  *
   163  * class MyCellRenderer extends JLabel implements ListCellRenderer<Object> {
   163  * class MyCellRenderer extends JLabel implements ListCellRenderer<Object> {
   164  *     final static ImageIcon longIcon = new ImageIcon("long.gif");
   164  *     static final ImageIcon longIcon = new ImageIcon("long.gif");
   165  *     final static ImageIcon shortIcon = new ImageIcon("short.gif");
   165  *     static final ImageIcon shortIcon = new ImageIcon("short.gif");
   166  *
   166  *
   167  *     // This is the only method defined by ListCellRenderer.
   167  *     // This is the only method defined by ListCellRenderer.
   168  *     // We just reconfigure the JLabel each time we're called.
   168  *     // We just reconfigure the JLabel each time we're called.
   169  *
   169  *
   170  *     public Component getListCellRendererComponent(
   170  *     public Component getListCellRendererComponent(