I've created a JTextField in which I change the back and foreground colors. Is it possible to change the color of the text cursor or do I need to make a custom, colored cursor. Sorry if this is pathetically basic, but I can't seem to find the answer. thanks!
Ted, Most things are possible in Java! Well, at least when it comes to the way swing components appear to the user. JTextField inherits numerous methods from JTextComponent with which to modify and interrogate your cursor. Actually a Cursor is what your mouse controls.... The text cursor is known as a Caret. You can get a handle to the Caret object itself and manipulate it directly. Simpler though is to use among other things, getCaretColor and setCaretColor methods, e.g. JTextField txtUserName = new JTextField(); txtUserName.setCaretColor(Color.red); This should assist you I believe. Kind Regards, Steve