Solved

Set Focus

Posted on 1998-08-28
1
157 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now