1 32 33 package it.businesslogic.ireport.gui.style; 34 35 import java.awt.Component ; 36 import javax.swing.DefaultListCellRenderer ; 37 import javax.swing.JComponent ; 38 import javax.swing.JList ; 39 40 44 public class StyleCellRenderer extends DefaultListCellRenderer { 45 46 47 public StyleCellRenderer() { 48 super(); 49 } 50 51 public Component getListCellRendererComponent( 52 JList list, 53 Object value, 54 int index, 55 boolean isSelected, 56 boolean cellHasFocus) 57 { 58 Component c = super.getListCellRendererComponent(list,value,index,isSelected,cellHasFocus); 59 ((JComponent )c).setOpaque(isSelected); 60 return c; 61 } 62 63 } 64 | Popular Tags |