KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > memoire > vainstall > xui > XuiLabel


1
2 package com.memoire.vainstall.xui;
3
4 import java.awt.*;
5 import javax.swing.*;
6 import javax.swing.border.*;
7
8 public class XuiLabel extends JLabel
9 {
10   public XuiLabel(String JavaDoc _text)
11   {
12     super(_text);
13     setForeground(Color.black);
14     setFont(new Font("SansSerif",Font.PLAIN,12));
15     setBorder(null);
16     setOpaque(false);
17   }
18
19   public void paint(Graphics _g)
20   {
21     ((Graphics2D)_g).setRenderingHint
22       (RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
23     super.paint(_g);
24   }
25 }
26
Popular Tags