aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Cursor color of JTextfield Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Cursor color of JTextfield" Watch "Cursor color of JTextfield" New topic
Author

Cursor color of JTextfield

Hugo Anbeek
Greenhorn

Joined: Dec 03, 2008
Posts: 2
Hi,

In a program I wrote I set the background color of a textfield to black and the foreground color to white. However the cursor remains black is it possible to set the color of the cursor?

Thnx.

Hugo
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
textField.setCaretColor(Color.WHITE);
Hugo Anbeek
Greenhorn

Joined: Dec 03, 2008
Posts: 2
gracias (i feel stupid lol)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cursor color of JTextfield
 
Similar Threads
File Organization
Is Ruby easier to learn than Java, since there appears to be less code to write?
need to make the text cursor white in a black text editor
Input Textfield Background Color When the Cursor Is There
custom cursor in XOR mode