public HighlightedButton(String label){
  super(label);
  Graphics2D g2d=highlight.createGraphics();
  g2d.setComposite(AlphaComposite.Clear);
  g2d.fillRect(0,0,HIGHLIGHT_SIZE,HIGHLIGHT_SIZE);
  g2d.setComposite(AlphaComposite.SrcOver);
  Point2D center=new Point2D.Float((float)HIGHLIGHT_SIZE / 2.0f,(float)HIGHLIGHT_SIZE / 2.0f);
  float radius=(float)HIGHLIGHT_SIZE / 2.0f;
  float[] dist={0.0f,.85f};
  Color[] colors={Color.white,new Color(255,255,255,0)};
  RadialGradientPaint paint=new RadialGradientPaint(center,radius,dist,colors);
  g2d.setPaint(paint);
  g2d.fillOval(0,0,HIGHLIGHT_SIZE,HIGHLIGHT_SIZE);
  g2d.dispose();
}

public HighlightedButton ( String label ) { super ( label ) ; Graphics2D g2d = highlight . createGraphics ( ) ; g2d . setComposite ( AlphaComposite . Clear ) ; g2d . fillRect ( 0 , 0 , HIGHLIGHT_SIZE , HIGHLIGHT_SIZE ) ; g2d . setComposite ( AlphaComposite . SrcOver ) ; Point2D center = new Point2D . Float ( ( float ) HIGHLIGHT_SIZE / 2.0f , ( float ) HIGHLIGHT_SIZE / 2.0f ) ; float radius = ( float ) HIGHLIGHT_SIZE / 2.0f ; float [ ] dist = { 0.0f , .85f } ; Color [ ] colors = { Color . white , new Color ( 255 , 255 , 255 , 0 ) } ; RadialGradientPaint paint = new RadialGradientPaint ( center , radius , dist , colors ) ; g2d . setPaint ( paint ) ; g2d . fillOval ( 0 , 0 , HIGHLIGHT_SIZE , HIGHLIGHT_SIZE ) ; g2d . dispose ( ) ; }
creates a new instance of highlightedbutton
