Re: set focus
On Jun 22, 10:22 am, "gg" <g...@Edm.noMail.net> wrote:
thanks but
void type not allowed here is the message I get when I tried
java.awt.EventQueue.invokeLater(jtextfiledFIleNbr.requestFocus())
What Knute meant was something along these lines.
<snippet>
Runnable r = new Runnable() {
public void run() {
jtextfiledFIleNbr.requestFocus()
}
};
EventQueue.invokeLater(r);
</snippet>
BTW. Is that attribute really called..
'jtextfiledFIleNbr'?
That is not the correct nomenclature for an
attribute name, and has spelling errors besides.
jtextfieldFIleNbr
..corrects the spelling error..
jTextFieldFileNbr
..corrects the capitalisation, but even then
the 'Nbr' should logically be either 'Number'
or (if abbreviated) 'N'
jTextFieldFileNumber
Of course, there are others who will jump in and
suggest that prepending the 'jTextField' part is..
some grievous sin, because ..I forget why, actually
(I've never completely understood that advice, and
those that suggest it never seem to fess up some
suggestions for what to do in peculiar* situations).
* E.G.
<snippet>
String pathToImageString =
"http://the.url/pretty.jpg";
URL pathToImageURL ...
</snippet>
Anybody?
--
Andrew Thompson
http://pscode.org/