package PbuliClass; import java.awt.Color; import java.awt.Cursor; import java.awt.Font; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.border.Border; import ColorAndFont.UIColor; /**°´Å¥Ä£ÐÍ*/ public class JButtonModel extends JButton{ /** * */ private static final long serialVersionUID = 1L; public JButtonModel(String title) { Font f=new Font("΢ÈíÑźÚ",Font.PLAIN,15);//°´Å¥×ÖÌåÉèÖà this.setText(" "+title+" "); this.setFont(f); this.setBorder(BorderFactory.createRaisedBevelBorder());//ÉèÖÃ͹ÆðÀ´µÄ°´Å¥ this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));//Êó±êÖ¸ÔÚ°´Å¥ÉϱäÊÖÐÍ Border bored = BorderFactory.createLineBorder(Color.gray);//ÉèÖð´Å¥±ß¿ò this.setForeground(UIColor.getButton_font()); this.setBorder(bored); this.setBackground(UIColor.getButton_color()); } }