can any one help me out with the this task??
i have to blink the specfic cell in jtable..
say the index of the cell is 2,2
i have tried the following code.. but it is not working
((Component) tableclassobject.jTable1.getCellRenderer(row, col)).setBackground(Color.red);
((Component) tableclassobject.jTable1.getCellRenderer(row, col)).setBackground(Color.white);
insted of blink one cell its results in colouring the whole table red!
can any one help me out with this?
Never, never use while (true) or Thread.sleep on the EDT (the event dispatch thread -- Swing's main thread) as all this will do is put your whole application to sleep.
Use a Swing Timer inside the renderer instead.
can u help explain it with the help of an example?
Wish I could but like most of the volunteers here I have significant time constraints. Since we're not paid but are volunteers, the brunt of effort here needs to be on the person asking the question, and in that light, your best bet is to read the Sun/Oracle tutorials on how to use Swing Timers and table renderers and then try it yourself in a small demo program to test the concept. If this doesn't work, then post this small test program here and we can help you.
Originally Posted by bonjovi4u