![]() |
| |||||||
|
| |
![]() |
| | LinkBack | Thread Tools |
|
#1
| ||||
| ||||
| concatenation, like "jButton"+ i, where (i) = 1,2,3... i use netbeans, and it creates the code for the buttons and text fields automatically, now can i make a method to read all the contents of these fields by a looplike this (((for example)))for (i=1;i |
| |
|
#2
| ||||
| ||||
| You can't do symbolic references like you're trying to do in Java, but you could make an array that has references to the textfields: JTextField fields[] = {jTextField1, jTextField2, jTextField3}; then iterate through the array. Then if you need to add more textfields you can just change the array initialization and keep the same loop. |
|
![]() |
| Thread Tools | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How does Mac write to the hard drive? | mike4life | Drives & Removable Media | 1 | 16th Jan 2008 01:03 PM |
| Write error? | killa92 | Multimedia, Drivers & Codecs | 4 | 1st Oct 2007 09:52 PM |
| can you tell me how i remove the write | deltagremlin | Sound, Speakers & MP3 Players | 2 | 20th May 2007 02:05 PM |
| Can someone write me a fitness plan? | rambling vine | Off Topic Discussion | 8 | 3rd May 2007 04:45 AM |
| Java programming question. What do java | rhohltjr | Web Design, Hosting & SEO | 4 | 20th Mar 2007 01:09 PM |
| Powered by vBulletin® Copyright ©2000 - 2008 Jelsoft Enterprises Ltd. SEO by vBSEO ©2008, Crawlability, Inc. |