List of usage examples for javax.swing JTextArea setCaretColor
@BeanProperty(preferred = true, description = "the color used to render the caret") public void setCaretColor(Color c)
From source file:com.mindcognition.mindraider.ui.swing.concept.annotation.renderer.AbstractTextAnnotationRenderer.java
private void configureEditor(JTextArea annotationTextArea) { // TODO use colors from the configuration annotationTextArea.setForeground(Color.WHITE); annotationTextArea.setBackground(Color.BLACK); annotationTextArea.setCaretColor(Color.RED); annotationTextArea.setSelectionColor(Color.YELLOW); annotationTextArea.setLineWrap(true); annotationTextArea.setWrapStyleWord(true); annotationTextArea.setFont(TEXTAREA_FONT); ;/*from w ww .ja v a 2 s .c o m*/ // undo and redo undoManager = new UndoManager(); annotationTextArea.getDocument().addUndoableEditListener(new EditorUndoListner(undoManager, toolbar)); }