Solved

Set Focus

Posted on 1998-08-28
1
161 Views
Last Modified: 2010-03-30
Just beginning a java course - How do you set focus in a TextField??  Please give details
0
Comment
Question by:cbugler
1 Comment
 
LVL 8

Accepted Solution

by:
diakov earned 50 total points
ID: 1222834
In the standart JDK 1.1, you must call the requestFocus() method of the component that you want to get the focus. The component must already be constructed and visible on the screen, when you do that. The visibility of a compoennt can be tested with isVisible() of the component.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question