Java仿千千静听音乐播放器源代码 自己收集的。
} public void mouseClicked(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseReleased(MouseEvent e) { } pressed = false; this.repaint(); exited = true; this.repaint(); exited = false; this.repaint(); pressed = true; this.repaint();
LButton.java
package eb.cstop.swing;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class LButton extends JButton implements MouseListener {
public LButton(String text) { super(text); public LButton() { } this.setButton(); private final Font font = new Font("宋体", 0, 12); private boolean mouseOn = false; private boolean mouseDown = false;