Re: Activating anti-aliasing in Swing
- From: jonck@xxxxxxxxxxxxxxx
- Date: 26 May 2005 07:13:54 -0700
> java -Dswing.aatext=true Main
Thank you for your suggestion. The JVM is accepting -Dswing.aatext=true
as a valid option, however, it does not appear to do anything, all my
Swing components still render the same. Also, from what Bill said, it
seems like it's not something to use in production code.
At the moment I'm having to override paintComponent for every Swing
component I use to get anti-aliasing working:
public void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
super.paintComponent(g2d);
}
Is this really the only way to get anti-aliasing in Swing at the moment
(using 1.4.2), or is there a more elegant way that someone knows of?
Thanks, Jonck
.
- Follow-Ups:
- Re: Activating anti-aliasing in Swing
- From: Richard Wheeldon
- Re: Activating anti-aliasing in Swing
- From: Boudewijn Dijkstra
- Re: Activating anti-aliasing in Swing
- From: Bill Tschumy
- Re: Activating anti-aliasing in Swing
- References:
- Activating anti-aliasing in Swing
- From: jonck
- Re: Activating anti-aliasing in Swing
- From: Christian Kaufhold
- Activating anti-aliasing in Swing
- Prev by Date: Re: Activating anti-aliasing in Swing
- Next by Date: Re: applets won't appear
- Previous by thread: Re: Activating anti-aliasing in Swing
- Next by thread: Re: Activating anti-aliasing in Swing
- Index(es):
Relevant Pages
|
|