HTML Code:hello, I have a JTable component and im using JTextPane as Renderer Compoenent as well as Editor Compoent. When i click on table row , that row does not show in table it goes. here is my renderer code and editor code for jtable.TableRenderer rend = new TableRenderer(); jtRepTable.getColumnModel().getColumn(0).setCellRenderer(rend); TableEditor editor = new TableEditor(); editor.setTableRenderer(rend); jtRepTable.getColumnModel().getColumn(0).setCellEditor(editor); public class TableRenderer extends JTextPane implements TableCellRenderer { public TableRenderer() { //public RepViewTableRenderer(boolean flag) { //this.isDisplayWithAuthor = flag; this.setEditable(false); } @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { setEditable(false); JScrollPane jsp = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_NEVER, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jsp.setViewportView(this); jsp.setBorder(BorderFactory.createEmptyBorder()); AttributeSet attr = new SimpleAttributeSet(); BatchDocument bDoc = new BatchDocument(); bDoc.appendBatchString("string", attr); bDoc.processBatchUpdates(0); setDocument(bDoc); if (getPreferredSize().height != table.getRowHeight(row)) { table.setRowHeight(row, jsp.getPreferredSize().height); } return jsp; } } public class TableEditor extends AbstractCellEditor implements TableCellEditor{ JTextPane pane; TableCellRenderer renderer; public TableEditor(){ pane = new JTextPane(); } public void setTableRenderer(TableCellRenderer re){ this.renderer=re; } @Override public Component getTableCellEditorComponent(JTable table,Object value,boolean isSelected,int row,int col){ pane.setEditable(false); JScrollPane scrollpane = (JScrollPane)renderer.getTableCellRendererComponent(table, value, isSelected, isSelected, row, col); pane = (JTextPane)scrollpane.getViewport().getView(); pane.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent me){ if(me.getClickCount()==2){ opennewpopupdialog(); } } }); return pane; } public Object getCellEditorValue(){ return pane.getSelectedText(); } }