Java仿千千静听音乐播放器源代码(5)
发布时间:2021-06-06
发布时间:2021-06-06
Java仿千千静听音乐播放器源代码 自己收集的。
} public LButton(ImageIcon icon) { } public LButton(String text, ImageIcon icon) { } private void setButton() { } public void paintBorder(Graphics g) { this.setContentAreaFilled(false); g.setColor(new Color(255, 255, 255)); g.fillRect(3, 3, this.getSize().width - 5, this.getSize().height - 5); if (!this.mouseDown) { if (!this.mouseOn) { } g.drawLine(3, 2, this.getSize().width - 3, 2);// TopLine g.drawLine(3, this.getSize().height - 3, this.getSize().width - 3, this.getSize().height - 3);// BottomLine g.drawLine(2, 3, 2, this.getSize().height - 4);// LeftLine g.drawLine(this.getSize().width - 2, 3, this.getSize().width - 2, this.getSize().height - 4);// RightLine int height = this.getSize().height - 5; int row = 3; while (row <= height) { int now = (row * 100) / height; if (now <= 35) { if (!mouseOn) { g.setColor(new Color(245 - now, 245 - now, 245 - now)); } else { g.setColor(new Color(160, 160, 160)); g.setColor(new Color(180, 180, 180)); } else { this.setFont(font); this.addMouseListener(this); this.setForeground(new Color(0, 70, 150)); super(text); this.setIcon(icon); this.setButton(); this.setIcon(icon); this.setButton();
上一篇:电子厂生产安全用电知识考试题
下一篇:樟宜机场服务品牌蓝背景