
Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
> > Any ideas how to make it refresh or repaint
> > itself at the right times?
>
> I'd say the problem is in your code,
> the (SHORT) code you did not post..
> <http://www.physci.org/codes/sscce.jsp>
I figured out the problem. In my custom component's method
public void paintComponent(Graphics g) {
I was painting the component into g.getClipRect().
This works if it's being called for a complete table cell.
But if the cell is being scrolled and it's called for a
partial cell, it just paints on the clip region, which
doesn't look right. The way to do it is to paint in
the whole table cell which is gotten from:
_table.getCellRect(_row, _column, true)
- Mitch
Christian Kaufhold - 14 Oct 2004 15:46 GMT
>> > Any ideas how to make it refresh or repaint
>> > itself at the right times?
[quoted text clipped - 6 lines]
>
> public void paintComponent(Graphics g) {
^^^^^^
protected
> I was painting the component into g.getClipRect().
> This works if it's being called for a complete table cell.
[quoted text clipped - 4 lines]
>
> _table.getCellRect(_row, _column, true)
Incomprehensible. There is no need to paint outside the clipping region
(as nothing can be painted there anyway). Please post your code.
Christian

Signature
And in short, I was afraid.
Bryan E. Boone - 19 Oct 2004 17:05 GMT
>>>>Any ideas how to make it refresh or repaint
>>>>itself at the right times?
[quoted text clipped - 24 lines]
>
> Christian
...Also, if you're inside the custom renderer (I assume some kind of
Component implementing the renderer interface),
there's no need to call _table.getCellRect(...).
You have the rectangle as in:
Rectangle r = new Rectangle(getSize());
...That being said... Please post your code.
-Bryan