Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need Volunteer to help with JTextArea,JScrollPane problem...  RSS feed

Michael Remijan
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ( because I'd like some help looking at
the code and getting this to work right. Thanks!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!