public java.awt.Component | getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
JLabel label = (JLabel)super.getListCellRendererComponent(
list,value,index, isSelected, cellHasFocus);
try {
Method meth = value.getClass().getMethod(method,null);
if(meth != null) {
Object retval = meth.invoke(value,null);
label.setText(""+retval);
}
} catch (Exception ex) {
System.out.println("got an execption: " + ex);
ex.printStackTrace();
}
return label;
|