public Component getListCellRendererComponent( JList list, Object value, int modelIndex, boolean isSelected, boolean cellHasFocus) { String text= ((String)value).replace('\t', ' '); Component c= super.getListCellRendererComponent(list, text, modelIndex, isSelected, cellHasFocus); setText(text); setToolTipText(text); return c; } }
/** * Returns the component used to present the trace */ public Component getComponent() { if (fList == null) { fList= new JList(new StackTraceListModel()); fList.setFont(new Font("Dialog", Font.PLAIN, 12)); fList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); fList.setVisibleRowCount(5); fList.setCellRenderer(new StackEntryRenderer()); } return fList; }