The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
June 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


I'll try it

Posted by Lisa on July 05, 2000 at 12:17 PM

> Thanks Mike - I'll give it a try!

I didn't read the book lately, but i belive that to set a
> text into a Button u have to do this :
> yourButton.setText("your text");
> to capture the focus u have to do this:
> yourButton.grabFocus();
> but im not shure if it works in swing and in awt

> Mike

> > I'm having trouble with Chap 13 Ex 5. I'm not sure what code to use to type text into a Button field & how to capture the focus. I've been stuck for 2 days now so I'm hoping someone has an example to share to get me past this.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us