public class CButton extends JButton{
public static int B_Width=86;
public static int B_Height=19;
public CButton(String text,ImageIcon icon,boolean bool)
{
super(text,icon);
Font font=new Font("",Font.PLAIN,12);
this.setFont(font);
setContentAreaFilled(false);
if(bool==true)
{
//setBorder(null);
this.setBorderPainted(false);
setHorizontalTextPosition(SwingConstants.CENTER);
}
else
{
//setBackground(new Color(255,255,255));
this.setIconTextGap(0);
setHorizontalTextPosition(SwingConstants.CENTER);
setVerticalTextPosition(SwingConstants.BOTTOM);
setPreferredSize(new Dimension(50,60));
}
}
}
[此贴子已经被作者于2007-7-11 11:15:08编辑过]