Originally Posted by
kurt-hardy
Because the getTableCellRendererComponent method is in the MyRenderer class, and the Start time and stop time are in the main class, Im confused on how i can do a check against the start time and stop time (these time can be different and there may also be more than one event per table).
Can't you get the values directly from the table? You have access to it via the table parameter. Or, since you're writing a custom renderer, you could just pass the main class (or better yet, the start and stop times) in as parameters to the constructor of the renderer.
Originally Posted by
kurt-hardy
I tried this way and it works fine but i then cannot set the cell value from "BetweenTime" To ""?
I'm not sure what you mean. Why can't you? I'd suggest you post an
SSCCE that demonstrates the problem.
Originally Posted by
kurt-hardy
and i tried calling the method via super (like you did) but i got errors. (cannot find symbol)
Again, that's not really specific enough for me to be able to help. What is the actual error? What is the actual code you're trying to use? Again, an SSCCE would be nice.
Originally Posted by
kurt-hardy
Also is there an advantage of using super instead of setting a default_renderer like i did?
The advantage would be that you'd only have one instance of a renderer instead of the two that you currently have. There's no need to have two like you do, since you're only really using the methods of one of them.