Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

caret color

 
Melanie Fitzgerald
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone suggest a way to change the color of the caret in a textField, without using Swing ?
 
Devangi Patel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please set the foreground color for textfield as follow
TextField t=new TextField();
t.setForeground(Color.blue);
and then type caret into that field, so it will be blue colored.
 
Melanie Fitzgerald
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm actually trying to change the color of the cursor(caret)inside the textField, not the actual text itself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic