Results 1 to 2 of 2
- 12-02-2010, 04:45 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 12
- Rep Power
- 0
clearing/reseting text fields in GUI
Hi All!
I have some text field filed in when an item in the list field is selected:
When i select one item from list field 6 text fields are getting full with some text. Afterward, when I select another item from list field, onlt the first field is getting updated but the rest stay with older values.Java Code:private void jList1ValueChanged(javax.swing.event.ListSelectionEvent evt) { String fileName = new Filename(jList1.getSelectedValue().toString(),'\\', '.').filenamext(); SearchFiles searchfiles = new SearchFiles(); try { searchfiles.SearchIndex(fileName); } catch (Exception ex) { Logger.getLogger(EBookView.class.getName()).log(Level.SEVERE, null, ex); } jTextField1.setText(jList1.getSelectedValue().toString()); jTextField2.setText(searchfiles.title); jTextField3.setText(searchfiles.author); jTextField4.setText(searchfiles.comments); jTextField5.setText(searchfiles.keywords); jTextField6.setText(searchfiles.description); }
I tried to add jTextField2.setText(""); to the begining to reset but didn't work. What can i do?
- 12-02-2010, 06:12 PM #2
Member
- Join Date
- Dec 2010
- Posts
- 12
- Rep Power
- 0
Similar Threads
-
reseting text fields; .setText("") best option?
By Unsub in forum Java AppletsReplies: 2Last Post: 02-23-2010, 02:48 AM -
searching a row using text fields
By bigj in forum New To JavaReplies: 1Last Post: 02-03-2010, 11:28 AM -
Problem With Text Fields!
By freshoreo in forum AWT / SwingReplies: 3Last Post: 08-04-2008, 09:52 PM -
Demonstration of text fields in SWT
By Java Tip in forum SWTReplies: 0Last Post: 07-25-2008, 02:20 PM -
Help with text fields in Java
By romina in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:29 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks