I have a Swing project I'm working on and I've gotten to a point where I can't get the GUI to do what I want it to do. Basically here's what I want to do. Suppose I have a list of 60,000 objects. I have a JTextArea inside of a JScrollPane and I start off by displaying 3000 of the objects (via the toString() method...this is a simple data file) When I either use the keyboard or use the mouse/scrollbar and "scroll" to the end of the 3000 objects, I want the following to happen:
1) Disable everything on the frame 2) Get the next 3000 objects 3) Append the object.toString() results to the JTextArea, but don't automatically scroll to the end. It should appear seemless to the user that new data was appended that can be viewed further 4) Have the JScrollBar resize/reposition itself. 5) Re-enable everything on the frame
I have been able to write code which does everything listed above but I am having a hell of a time getting 3 and 4 to work properly, especially number 4. If anyone is really good with Swing GUI's please contact me (firstname.lastname@example.org) because I'd like some help looking at the code and getting this to work right. Thanks!
Java EE Evangelist — Author, EJB 3 in Action 2nd Edition — Java Community Process Member