>>>>> Gérard Milmeister writes:

> [1 <text/plain; iso-8859-1 (quoted-printable)>] How can I set the
> default fonts and colors for java using awt.  When I run a program I
> get very ugly fonts (too small) and colors.

First you should check your Xserver' s font path, on my system it starts
with:
   FontPath   "/usr/X11R6/lib/X11/fonts/misc:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/Type1"
   FontPath   "/usr/X11R6/lib/X11/fonts/Speedo"
   FontPath   "/usr/X11R6/lib/X11/fonts/misc"
   FontPath   "/usr/X11R6/lib/X11/fonts/75dpi"
   FontPath   "/usr/X11R6/lib/X11/fonts/100dpi"
   FontPath   "/usr/X11R6/lib/X11/fonts/freefont"
   FontPath   "/usr/X11R6/lib/X11/fonts/sharefont"
....

You can change the default fonts by editing $JAVA_HOME/lib/font.properties.


The default colors can be changed by setting X resources (good window
managers should do that for you).
E.g:
*Text.activeBackground: #ffffff
*Text.activeForeground: #000000
*Text.background:       #ffffff
*Text.foreground:       #000000
*Text.highlightBackground:      #ffffff
*Text.highlightColor:   #000000

(These properties have effect on all applications, if you want to
restrict their effect on java applications you can use AWTapp.)


        Juergen

-- 
Juergen Kreileder, Universitaet Dortmund, Lehrstuhl Informatik V
Baroper Strasse 301, D-44221 Dortmund, Germany
Phone: ++49 231/755-5806, Fax: ++49 231/755-5802

Reply via email to