[prog] Java/Swing and antialiased fonts

Riccarda Cassini riccarda.cassini at gmx.de
Mon Mar 29 23:29:32 EST 2004


Hi everyone,

I'm new here, so I thought, a short introduction might be appropriate.
I'm a woman in her late twenties, who's finally discovered her love for
programming.
Despite my italian name, I'm from Germany (my father is from Italy).
After having finished uni, I worked in various fields, which mostly had
to do with graphics design, publishing, translation stuff, and some web
programming. Well, anything that allowed me to pay my bills.
I more and more realized, that I actually enjoy coding, and up to now,
I've managed to acquire some moderate expertise in Java, and some
rudimentary knowledge of scripting in Perl and Python. I still consider
myself a newbie.

Not too long ago, after quite some hunting, I finally managed to get a
job in the IT sector. With some luck, I was able to convince those
guys, that I'd be the right one for the job. Yay!!  Feels good to have
"Software developer" on one's business card :-)

I've been using Linux for somewhat over a year now, and I must say,
I've grown very fond of it. What I like in particular are those many
choices you have, and the almost infinite fine-control over the system.
Before that - you guessed it - I was mainly using Windows.

On to my technical question:

I'm currently working on an application which I took over from someone
else. The client who's paying for it, seems to have made up his mind,
that antialiased fonts would look fancier. His wish is my command, so
it's my job to find out how to implement that...

Having no local java guru around, I tried searching the web, but almost
anything I was able to dig up seems to describe how to use antialiased
fonts with the 2D drawing class. This is not what I need. The
application doesn't do any drawing, it just consists of many dialogs,
forms and tables, so I'd need to have all the regular widgets like
labels, checkboxes, textfields, comboboxes, etc. be displayed with
antialiased fonts.

I've not been able to make this work, however hard I tried. I'm afraid,
I'm just not getting something very fundamental... Do I just have to
enable some global Swing option which would then automagically make it
do what I want?  Or do I have to get some replacement class for
java.awt.Font? Or make the UI classes do their rendering via Graphics2D
objects?  Or something entirely different?  You see, I'm totally
confused. Actually, I'm no longer sure this is possible at all, though
I seem to remember faintly to have seen antialised java applications,
but I can't recall what those were.

Any pointers to tutorials, reference documentation or example code would
be warmheartedly welcome. Please be gentle with a beginner ;-)

Thanks in advance,

Riccarda



-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz



More information about the Programming mailing list