Board index » jbuilder » Changing font for one column of jdbTable

Changing font for one column of jdbTable


2003-09-29 10:04:12 PM
jbuilder15
Hi,
I have a jdbTable mapped on a QueryDataSet.
For one column, I'd like to use a font I made for it (a symbol font).
1?
I was unable to put my font in the font.properties file (it seems not to be
read for that font, because I changed others and it works)
My font names "Symboles cave ?vin", file SYMBCAVE.TTF
font.properties files :
--------------------
monospaced.bolditalic.0=Symboles cave ?vin,ANSI_CHARSET
filename.Symboles_cave__vins=SYMBCAVE.TTF
I tried ANSI_CHARSET and SYMBOL_CHARSET, no one works.
2?
How do I change the font for only one column ? I didn't find the way to do
this
Thanks answering
 
 

Re:Changing font for one column of jdbTable

For doing this, you have to derive JdbTable and override the
method
public Component prepareRenderer(TableCellRenderer renderer, int row,
int column) {
Component rendererComp = super.prepareRenderer(renderer,row,column);
// do something or not...
rendererComp.setFont(font);
}
hope this helps a bit
Olaf Raether
On Mon, 29 Sep 2003 16:04:12 +0200, "ber" < XXXX@XXXXX.COM >wrote:
Quote
Hi,

I have a jdbTable mapped on a QueryDataSet.
For one column, I'd like to use a font I made for it (a symbol font).

1?
I was unable to put my font in the font.properties file (it seems not to be
read for that font, because I changed others and it works)

My font names "Symboles cave ?vin", file SYMBCAVE.TTF

font.properties files :
--------------------
monospaced.bolditalic.0=Symboles cave ?vin,ANSI_CHARSET

filename.Symboles_cave__vins=SYMBCAVE.TTF

I tried ANSI_CHARSET and SYMBOL_CHARSET, no one works.

2?
How do I change the font for only one column ? I didn't find the way to do
this


Thanks answering