Andrius Šabanas
unread,Oct 23, 2009, 10:09:16 AM10/23/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vldocking
Hi all,
It would be nice to enable desktop rendering hints when custom-
painting icon for JTabbedPaneSmartIcon, so that rendered fonts use
subpixel antialiasing under Java 1.6, just like in standard Swing
widgets.
This is the code snippet that need to be added to the top of paintIcon
(...) method (I have also attached a patch to "Files" section for this
Google group):
---------------- starts here ----------------
// set default desktop font rendering hints
Object desktopHintsObject = Toolkit.getDefaultToolkit
().getDesktopProperty("awt.font.desktophints");
if (desktopHintsObject instanceof Map) {
g2.addRenderingHints((Map<?, ?>) desktopHintsObject);
}
---------------- end here ----------------
cheers,
Andrius