Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

default JLabel foreground color

261 views
Skip to first unread message

Alex Athanasopoulos

unread,
Jun 12, 1998, 3:00:00 AM6/12/98
to

When I create a JLabel, the text's foreground color is blue by default.
Can I change this default to black, so that I don't have to call
setForeground
for each label I create?

Thanks,

Alex Athanasopoulos

Pierre Lalonde

unread,
Jun 15, 1998, 3:00:00 AM6/15/98
to
Alex, try this:

      UIManager.put("Label.foreground", Color.black);
      UIManager.put("Label.background", Color.white);
 

-- 
Pierre Lalonde
 

0 new messages