ProgramWindowJava

How to access JSpinner's JTextField?

Hello,

I'm working with a JSpinner and I need to set its' focus with a call to requestFocusInWindow(), but I forget how to get access to its' JTextField. I've tried saying "Spinner.requestFocusInWindow()" but that doesn't seem to do anything and I know the JSpinner has a JTextField which it uses to display and edit the value. I'd like to make a call like "Spinner.getTextField().requestFocusInWindow()" but I don't remember how to gain access to the JTextField (the aformentioned quote doesn't work). Does anybody know how to do this?

Gib

Replay:How to access JSpinner's JTextField?
its simply:

getValue(); however, this will return an "Object" so youll probably have to cast the return value as a String or whatever you want.

Replay:How to access JSpinner's JTextField?
This will give me the value entered into the JSpinner, and I could cast it as a String. But what I asked was, how do I set the focus for the JSpinner. JSpinner.requestFocusForWindow() doesn't work but I know it can be done, and it's done through calling requestFocusForWindow() on the embedded JTextField. JSpinner.getValue() will not give me the JTextField, and my question is: What will?

[Previous] help!!!!!!!!!!!!!!!
[Next] easy questions

Google


Java

easy questions
recursion/iterator problem
repainting the whole frame??
Help Wih Chessboard Problem
Format US currency
Applet:How do I get a background image.
ArrayList printout?
Get rid of that comma in my JSpinner!!!
calling other classes
Variables not visable?
return statement trouble
how to setup showConfirmDialog?
Bumper car program
how to configure showConfirmDialog
database connection to jsp page
database connection to jsp page
Help with JEditorPane
show todays date
Paint Program :: Need some help please...
Help needed for image processing (school project)