Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #163

Re: JTable Cell Renderers

From "usenet" <usenet@THRWHITE.remove-dii-this>
Subject Re: JTable Cell Renderers
Message-ID <0T3l829vIect@uni.chka.de> (permalink)
Newsgroups comp.lang.java.gui
References <d6cd61bd2d47a854cbe65ddf5711eeec@localhost.talkaboutprogramming.com>
Date 2011-04-27 15:25 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
freesoft_2000 <freesoft_2000@yahoo.com> wrote:

> I tried writing and using the below code by extending the
> DefaultCellEditor class and uisng it but it only got worse as now if i
> apply the font to the selected text in the cell all the text dissapears

You are missing setText() in the editor. Also, do not use DefaultCell-
Editor.


[...]

> if(b == Button1)
> {
> //The below command line removes the cell editor of the JTable to
> //prevent any repitation of data from being added to the JTable

> Table1.removeEditor();

'removeEditor' should not be called and is probably accidentally public. Use

TableCellEditor c = table.getCellEditor();

if (c != null)
    if (!c.stopCellEditing())
         c.cancelCellEditing();



Christian

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar


Thread

JTable Cell Renderers "freesoft_2000" <freesoft_2000@THRWHITE.remove-dii-this> - 2011-04-27 15:25 +0000
  Re: JTable Cell Renderers "usenet" <usenet@THRWHITE.remove-dii-this> - 2011-04-27 15:25 +0000
    Re: JTable Cell Renderers "freesoft_2000" <freesoft_2000@THRWHITE.remove-dii-this> - 2011-04-27 15:25 +0000
      Re: JTable Cell Renderers "usenet" <usenet@THRWHITE.remove-dii-this> - 2011-04-27 15:25 +0000

csiph-web