01: package com.memoire.vainstall.xui;
02:
03: import java.awt.*;
04: import javax.swing.*;
05: import javax.swing.border.*;
06:
07: public class XuiButton extends JButton {
08: public XuiButton(String _text) {
09: super (_text);
10: setForeground(Color.white);
11: setFont(new Font("SansSerif", Font.PLAIN, 12));
12: setBorder(new XuiButtonBorder());
13: setPreferredSize(new Dimension(100, 30));
14: setOpaque(false);
15: setContentAreaFilled(false);
16: setFocusPainted(false);
17: }
18:
19: public void paint(Graphics _g) {
20: ((Graphics2D) _g).setRenderingHint(
21: RenderingHints.KEY_ANTIALIASING,
22: RenderingHints.VALUE_ANTIALIAS_ON);
23: super.paint(_g);
24: }
25: }
|