Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2523 > unrolled thread
| Started by | ":-o" <:-o@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:39 +0000 |
| Last post | 2011-04-27 15:39 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.java.gui
JTable (setForeground on ":-o" <:-o@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
Re: JTable (setForeground "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
| From | ":-o" <:-o@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:39 +0000 |
| Subject | JTable (setForeground on |
| Message-ID | <a8OdnarhHPmI6mvbnZ2dnUVZ_j6dnZ2d@comcast.com> |
To: comp.lang.java.gui Thanks, Based on Events/conditions , I need to set the text in a JTable cell from default color (black) to background color (white) to "hide" the text. These conditions will force back/forth to the foreground coloring. Is any one cell containing text a JTextField or JLabel? How would I get a reference to the component to make the setForeground() call. Thanks again..... --- * 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
[toc] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:39 +0000 |
| Subject | Re: JTable (setForeground |
| Message-ID | <78a7af81acce6@uwe> |
| In reply to | #2523 |
To: comp.lang.java.gui :-o wrote: . >Based on Events/conditions , I need to set the text in a JTable cell from >default color (black) to background color (white) to "hide" the text. You best bet is to implement your own javax.swing.table.TableCellRenderer, but note that it would probably be better to simply have the returned component contain an empty String, based on 'Evensts/Conditions' otherwise if the user selects the cell/text, the text will become visible. -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via http://www.javakb.com --- * 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web