The Artima Developer Community
Sponsored Link

Java Answers Forum
JSpinners TextField Buggy?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

JSpinners TextField Buggy? Posted: Dec 20, 2005 2:44 AM
Reply to this message Reply
Advertisement
Is JSpinner's TextField buggy?

Why would this code Not work, does the textField used by JSpinner (JFormattedTextField)
overwrite the select Method of selectAll in textField? This is really wierd, I am able
to add a focusListener and do a whole other operations as I would a normal JTextField,
yet selectAll doesn't actually select All as it would in a JTextField.

    spinner = new JSpinner(new SpinnerNumberModel(someQty, 0, Integer.MAX_VALUE, 1));
    JComponent editor = spinner.getEditor();
    JTextField textField = ((JSpinner.NumberEditor)editor).getTextField();
    textField.selectAll();

Topic: pls help me to convert this prog into GUI Previous Topic   Next Topic Topic: ATM client server

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use