Java仿千千静听音乐播放器源代码 自己收集的。
} popup.add(paste); popup.add(delete); popup.addSeparator(); popup.add(selectAll); this.setSelectionColor(new Color(0, 80, 140)); this.setSelectedTextColor(Color.white); public void focusGained(FocusEvent e) { } public void focusLost(FocusEvent e) { } public void keyPressed(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void keyTyped(KeyEvent e) { } public void actionPerformed(ActionEvent e) { } public void mouseClicked(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON3) { this.requestFocus(); if (this.getPassword().length < 1) { selectAll.setEnabled(false); delete.setEnabled(false); Object source = e.getSource(); if (source == paste) this.paste(); this.selectAll(); this.replaceSelection(""); else if (source == selectAll) else if (source == delete) if (e.getKeyCode() == KeyEvent.VK_ENTER) { } this.transferFocus(); this.selectAll();