The JTextArea seems to ignore the color for selected text. One can see that in the TextArea section of the Swing demo: The bottom right JTextArea on the "custom-color" tab should paint white text with a black selection.
This is my playground. :)
Subject: Bug 26675 CVSROOT: /cvsroot/classpath Module name: classpath Branch: Changes by: Robert Schuster <rschuster@savannah.gnu.org> 06/03/17 15:29:33 Modified files: . : ChangeLog javax/swing/text: PlainView.java Utilities.java Log message: This fixes PR #26675. 2006-03-17 Robert Schuster <robertschuster@fsfe.org> * javax/swing/text/PlainView.java: (drawLine): Rewritten. (drawSelectedText): Corrected last argument for Utilities.drawTabbedText() call. (paint): Store start and end of selection in object variables, store constant values of for-loop in local variables. * javax/swing/text/Utilities.java: (drawTabbedText): Add 'pixelWidth' to the return value, store constant value of for-loop in local variable. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6777&tr2=1.6778&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/PlainView.java.diff?tr1=1.38&tr2=1.39&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/Utilities.java.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
Fixed!