1 21 22 package org.armedbear.j; 23 24 import java.awt.Graphics ; 25 import java.awt.Rectangle ; 26 import javax.swing.AbstractButton ; 27 import javax.swing.JComponent ; 28 import javax.swing.plaf.ComponentUI ; 29 import javax.swing.plaf.metal.MetalButtonUI ; 30 31 public final class ButtonUI extends MetalButtonUI 32 { 33 private static final ButtonUI buttonUI = new ButtonUI(); 34 35 public static ComponentUI createUI(JComponent c) { 36 return buttonUI; 37 } 38 39 protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, 40 String text) 41 { 42 Display.setRenderingHints(g); 43 super.paintText(g, (JComponent )b, textRect, text); 44 } 45 } 46 | Popular Tags |