🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11502

Re: change the color of a field in a jTable

#11502
From: Khurram Shakir
Date: Thu, 13 May 1999 00:00
26 lines
1220 bytes
Stephen
use JTableColumn class and JTable getcloumn function for extracting specific
field, e.g

JTable table = new JTable(model);
JTableColumn col = table.getColumn(Object identifier);
JLabel label = new JLabel();
label.setOpaque(true);
label.setBackground(Color.Black);
// now set the label properties
col.setCellRenderer(new DefaultTableCellRenderer(label)) ;


In this manner when ever you change the label properties the properties of
'col' is changed.
if you have still confusion do  not hesitate to ask again,
hope this will help....

regards,

--
Khurram Shakir
Java Developer
Progressive Systems(Pvt.) Limited
kshakir@prosys.com.pk
ICQ # : 17135971
Technical Details
Message-ID: <7hcm9i$riu3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37395F6A.45DCD0F@mgm-edv.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,9dc2e26eb36ff9e5
X-Google-Attributes: gid111d45,public
From: "Khurram Shakir" <kshakir@prosys.com.pk>
Subject: Re: change the color of a field in a jTable
Date: 1999/05/13
Message-ID: <7hcm9i$riu3@forums.borland.com>
X-Deja-AN: 477133236
References: <37395F6A.45DCD0F@mgm-edv.de>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Progressive Systems
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing