zsh_root
2023-06-01 6a11d13546c73912c019002f914c39202b3b49d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package publicclass;
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;
 
/**°´Å¥Ä£ÐÍ*/
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(Color.black);
        this.setBorder(bored);
        this.setBackground(UIColor.getBlues());
        
    }
    
    
 
}