aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Remove focus Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Remove focus" Watch "Remove focus" New topic
Author

Remove focus

Yog Ananth
Greenhorn

Joined: Dec 28, 2004
Posts: 27
How to remove focus from a particular component. Currently in my text field the cursor is blinking now i want to remove the cursor position.
sasi kala
Ranch Hand

Joined: Dec 17, 2004
Posts: 68
hi Ananth,

Use textfield1.setFocusable(false), then the field will not get focus at any time.

If you want to transfer focus from one textfiled to another
use,
//in textfield1's key listener (key pressed and key = ENTER)
textfield2.requestFocus()

Hope This Helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remove focus