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


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

Re: JTable Cell Renderers

From "usenet" <usenet@THRWHITE.remove-dii-this>
Subject Re: JTable Cell Renderers
Message-ID <0T3kvafeIs4c@uni.chka.de> (permalink)
Newsgroups comp.lang.java.gui
References <0f1b7cf8f0d7ec76c829829ae950f4f3@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 am currently trying to use a JTextPane as a cell
> renderers for a JTable but it does not seem to work although the program
> compiles. I alsways get an error stating class cast exception saying that
> i must cast the editor component to JTextField instead of a JTextPane
> although i am using a JTextPane as a cell renderer.

Editor != Renderer

Your general logic is also not clear: Changing the font of the editor
will not have any permanent effects unless the font change is actually
stored somewhere permanently (If it is supposed to be part of the data to
be edited, in the TableModel).


>                     Below is a small compilable that i have done which
> compiles and throws the exception that i have mentioned about

It is not directly compilable: The unused class CustomTableCellRenderer
is missing, and your newsreader has wrapped lines so that comments have
become code.


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 | Next 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