This content has been marked as final. Show 2 replies
I am new to JAVA swingWelcome. Please read the sticky post on top of the forum (How to post code). And here is another link which when followed increases the chance of receiving proper help.
how to set the whole text selected in JAVA jspinfieldI don't know a JSpinField class in java. I do, however, know the JSpinner class and can tell you how to select its text.
... new JSpinField();
If JSpinField is your extension to JSpinner, then I wonder why you want to have it all selected. The purpose of a date spinner is to encrease or decrease parts of a given date (dd.MM.yyyyy). If you want to enter a complete date, I would recommend to use a JFormattedTextField with a DateFormatter instead.
But if you insist on using the spinner, let me know.
Thanks for your reply. yes JSpinField is the extension to JSpinner . It was part of jcalendar-1.4.jar library that is available for public in the url http://www.toedter.com/en/jcalendar/
Now , i modified the source of the jcalendar-1.4.jar library by editing the JSpinField.java class.
Here i updated the JTextField used along with JSpinner variable to public access, previously it was protected.
Now i could be able to apply selectAll() method to that text field and my problem got solved.