This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have to enter text into my jtextfield and have it show in the lbChoices jlist WHEN the focus is lost. It acts like it is there because I have a no duplicate line in there that appears when I try to type the same thing twice! Driving me crazy! Any help would be greatly appreciated. Thank you.
Do you mean that the text isn't in the JList before you enter the new list item, but you get a no duplicates message and then the text still isn't in the JList?
The JList should repaint when the entry is added, and there should be no need to repaint when the list contents are not modified. Repainting a JList will repaint each element in the list. To ensure the list is repainted (equivalent to repaint() call) is cover up the JList and uncover it. This will force all elements in the list to rerender themselves.
Everything is theoretically impossible, until it is done. ~Robert A. Heinlein