Java School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a Java Expert!

Join 307,157 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,532 people online right now. Registration is fast and FREE... Join Now!




How to Make the TextField Focus?

 

How to Make the TextField Focus?

fsloke

2 May, 2008 - 03:08 PM
Post #1

D.I.C Regular
***

Joined: 19 Dec, 2007
Posts: 344



Thanked: 13 times
My Contributions
Just say, My TextField now appear word "Hello World".

JTextField txt1 = new JTextField("Hello World");

It in gray color,

txt1.setForeground(Color.GRAY);

When the user click on the JTextField The word change to none. You can only see the curser blinking....

How to do this?

Thanks.

User is offlineProfile CardPM
+Quote Post



Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 05:37PM

Live Java Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month