Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

lost text

Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

In my project I save objects to file. One such object I call Listbox. It extends JScrollPane and its viewport contains a JList.
It looks like so:

In my SaveFile() method using SwingUtilities.invokeLater() method (see below), I can save all the objects to file alright, but the text in my Listbox keeps disappearing. I have tried calling repaint(), revalidate() on both Listbox and the JList it contains, but neither works. The text is there, it just isn't showing after a save. What am I doing wrong?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic