|
|
Archive for July, 2008
Sunday 27 July 2008 @ 2:23 am
Here’s a ready made Upper case text field written as a swing component. It converts all characters entered in it automatically to upper case before inserting into it’s own document. So the when the user types in this text field he will see only characters in upper case irrespective of the case with which he types. There is no limitation to use this code. Use it in whatever way you like.
Wednesday 23 July 2008 @ 6:30 pm
Have you ever tried to make a textfield that accepts only 20 characters? Or a text area that automatically converts the user typed letters to upper case? Swing’s Document Listener is the most accurate and hassle-free way to achieve this in Swing. This articles explains you what you need to get started with Document Filter. Step by Step.
Friday 4 July 2008 @ 5:07 am
Let’s consider a common coding situation. Suppose you have a text field in your form that accepts an email address. Suppose you need to code such that if the email address typed by the user is not valid, then you shouldn’t let the focus out of this textfield. Where would you put such a code? In the focus lost of the email-text-field? In the focus gained for all other text-fields? I don’t know what’s the best way to do this in JavaScript but there’s a super-elegant way in Swing!
Thursday 3 July 2008 @ 7:13 pm
Consider you have a form with several text fields and some buttons. One of the buttons is usually the “default” button , which would get executed if the user pressed enter, while the focus is in any of the text fields in that form. You should have definitely seen this type of buttons. As an example in google.com, you can type you query in the textfield and press enter, which is same as clicking the “Google Search” button. |
Popular Articles
Blog Categories
Monthly Archives
Resources
|