Results 1 to 6 of 6
- 12-29-2011, 08:26 AM #1
May I know how to add colors for specific cell in the JTable?
May I know how to add colors for specific cell in the JTable?
Thanking You,Java Code:while(rs.next()) { for(int i = 1; i <=n; i++) { data[i-1] = rs.getString(i); } d.addRow(data); } add(new JScrollPane(jtable)); setVisible(true);
With Regards,
Nandhini.
- 12-29-2011, 02:28 PM #2
Re: May I know how to add colors for specific cell in the JTable?
I'm not really sure what the code is supposed to be demonstrating, but what you're looking for is a cell renderer. The basic tutorial covers them.
How to Use Tables (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 12-29-2011, 10:28 PM #3
Re: May I know how to add colors for specific cell in the JTable?
Moved here from 'New to Java'
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-03-2012, 10:07 AM #4
Similar Threads
-
How to apply different font and colors to each cell in JTable
By prasad.vara in forum AWT / SwingReplies: 1Last Post: 10-18-2010, 06:48 AM -
Make specific cell a hyperlink (triggers event)
By javanewbie in forum AWT / SwingReplies: 3Last Post: 06-21-2009, 03:26 AM -
Colour Specific Cell within Table
By poddy88 in forum New To JavaReplies: 2Last Post: 04-14-2009, 08:20 AM -
add a check box to only one cell in a JTable
By aruna1 in forum New To JavaReplies: 4Last Post: 04-03-2009, 06:28 PM -
Select specific cell
By Echilon in forum New To JavaReplies: 1Last Post: 01-01-2008, 07:47 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks