Java仿千千静听音乐播放器源代码 自己收集的。
private boolean pressed = false; public CrystalButton() { } public CrystalButton(String text) { } public CrystalButton(String text, ImageIcon icon) { } public CrystalButton(String text, ImageIcon icon, String toolTip) { } public void setAlpha(float alpha) { } public float getAlpha() { } public void paintBorder(Graphics g) { } public void paintComponent(Graphics g) { Graphics2D cs = (Graphics2D) g; int width = this.getSize().width; int height = this.getSize().height; cs.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha)); return alpha; this.alpha = alpha; this.repaint(); this.addMouseListener(this); this.setText(text); if (icon != null) this.setIcon(icon); this.setContentAreaFilled(false); this.setFont(new Font("宋体", 0, 12)); this.setForeground(Color.white); this.setToolTipText(toolTip); this(text, icon, ""); this(text, null); this("");