Skip to content

Commit 2b90442

Browse files
committed
add lbl rendering hint
1 parent debbde9 commit 2b90442

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/main/kotlin/dartzee/bean/RenderUtils.kt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ fun paintLabel(
2727
lbl.foreground = color
2828
lbl.horizontalAlignment = SwingConstants.CENTER
2929
lbl.font = font
30+
lbl.putClientProperty(
31+
RenderingHints.KEY_TEXT_ANTIALIASING,
32+
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB,
33+
)
3034

3135
// Work out the width for this label, based on the text
3236
val metrics = Canvas().getFontMetrics(font)

0 commit comments

Comments
 (0)