From: Ben Soares Date: Mon, 6 Jul 2020 14:54:52 +0000 (+0100) Subject: JAL-3676 improvement for visual selection of console text - fg color change if required X-Git-Tag: Release_2_11_1_1~13^2~26^2~6^2~2^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bf049bfae9dda6deb9ca2f39175b5404b7dace3f;p=jalview.git JAL-3676 improvement for visual selection of console text - fg color change if required --- diff --git a/src/jalview/gui/Console.java b/src/jalview/gui/Console.java index d91985d..a493640 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); } });