My original post:
 >>I need to set the row color for my subclass of JTable.
 >>All the example code that I've discovered show how to
 >>change the color of a *column*.

At 06:14 AM 5/10/2002 -0700, Roger Talkov wrote:
 >You need to have your own TableCellRenderer and have it set the colors,
 >using the tables default renderer won't work.

        I got that impression from reading a couple of Swing books
        and a couple of online articles, but got any sample code?

        So if I need to *dynamically* change color of a row (e.g., I just
        got an incoming JMS msg and I need to change the color of the 5th
        row to red), I have to put this intelligence into the renderer?
        In other pseudo-code words:

        On incoming JMS msg
                if a row needs to be red
                        statusObj.colorChangeRequest(true)
                        statusObj.setRowColor(row-num, some-color)

        
        MyOwnCellRenderer
                If color change required
                        Look at statusObj for info
                                set color of that row

        Does this sound reasonable?  This stuff is just not documented
        too well imho.

        Thanks!

        Frank G.

+======================================================================+
| Crossroads Technologies Inc, 55 Broad Street, 28th Fl, NYC, NY 10004 |
| Enterprise Java Engineering           ePager: [EMAIL PROTECTED]     |
| Email: [EMAIL PROTECTED]         Web: www.CrossroadsTech.com |
| Voice: 212-482-5280                      Fax: 212-482-5281           |
+======================================================================+

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to