How can I thread in java? In vb you can use application.DoEvents and that way your application doesnt freeze when its doing something. How can I do this with Java?


To make things clearer, this is what Im doing. I am simply opening a file and adding each line into a DefaultListModel and then Im setting that model to a JList. While this happens it is freezing the app, since the file is fairly large. If I use threading will this stop the application from freezing? Is there something else I can do?

I appreciate the help.