Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cursor color of JTextfield

 
Hugo Anbeek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
textField.setCaretColor(Color.WHITE);
 
Hugo Anbeek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gracias (i feel stupid lol)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic