From 06b6925e0f8b8b9bd1d002e6ca47c7c51c16afcd Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 6 Jul 2020 15:54:52 +0100 Subject: [PATCH] JAL-3676 improvement for visual selection of console text - fg color change if required --- src/jalview/gui/Console.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/gui/Console.java b/src/jalview/gui/Console.java index dc5968d..89e0134 100644 --- a/src/jalview/gui/Console.java +++ b/src/jalview/gui/Console.java @@ -144,14 +144,18 @@ public class Console extends WindowAdapter { private Color bg = textArea.getBackground(); + private Color fg = textArea.getForeground(); + public void mousePressed(MouseEvent e) { textArea.setBackground(textArea.getSelectionColor()); + textArea.setForeground(textArea.getSelectedTextColor()); } public void mouseReleased(MouseEvent e) { textArea.setBackground(bg); + textArea.setForeground(fg); } }); -- 1.7.10.2