I have JDialog box that houses 3 JPanels , SearchPanel, DataPanel and ButtonPanel.
The SearchPanel houses a JLabel (searchLabel) and JTextField (mySearchField).
The DataPanel (myDataPanel) has several JComboBox's. I've added (sub-classed) ActionListener to the combo boxes that will take the selected object, process the data, and do a mySearchField.setText(theData) on the SearchPanel's JTextField.
The problem I seem to have is it does not seem to be repainted, i.e. the old text "Blank" is still there. I've tried repaint() on the JDialog, DataPanel, JTextField (all I could think of) as well as invalidate() and revalidate(). I'm not sure what to try next. I know I'm missing something, just can't figure out what. I've show the relevent code below (cut out the non-revelent parts). Any help is greatly appreciated!
At line 143, in the debugger (Eclipse) I can see that the mySearchField->model (PlainDocument)->data->array has the correct
string from what was selected in the combo box. I've even added an
mySearchField.addActionListener(new ActionListener(ActionEvent ae) {...}); in the initSearchPanel() as well as a mySearchField.postActionEvent() in the FieldListeners actionPerformed() to know avail.
OCP Java SE 6 Programmer | OCM Java SE 6 Developer | OCE Web Components (OCEWD) | OCE JPA 6 (OCEJPAD) | OCE EJB 6 (OCEBCD) | OCE Web Services (OCEWSD) | OCM Java 6 Enterprise Architect(OCMEA)
MySQL Certified Administrator & Developer,
OMG Certified UML Prof. Fund., Int., Adv.