Results 1 to 3 of 3
- 02-23-2010, 12:44 AM #1
-
One option: Put them in a List such as a LinkedList, and then iterate through the list calling setText("").
Other option: getComponents from the Container, iterate through them testing for instanceof JTextField, and if matches, cast and setText("");
Best option: ?Last edited by Fubarable; 02-23-2010 at 12:57 AM.
- 02-23-2010, 02:48 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
I think the first option is east to use, and safer since no casting is required. Not a real mess, but I like to avoid it in my applications as much as possible.
Similar Threads
-
Metro WS apt option key="r"
By Steve11235 in forum Advanced JavaReplies: 3Last Post: 02-01-2010, 09:08 AM -
JAX-WS\METRO - apt with option option key="r"
By Talkinjive in forum Web FrameworksReplies: 0Last Post: 01-31-2010, 04:15 PM -
How to change my form design from "metal" to "nimbus" in Netbeans 6.7.1?
By mlibot in forum New To JavaReplies: 1Last Post: 01-21-2010, 09:20 AM -
MoneyOut.println("It took you (whats wrong?>",year,"<WW?) years to repay the loan")
By soc86 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:56 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks