• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to track down why setViewPortView on a JScrollPane is taking so long

 
David Feuer
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've built up an unreasonably large and unreasonably complicated JPanel. Unfortunately, when I use setViewportView to add it to a JScrollPane, a get an extended UI freeze—that operation takes several seconds. I'm trying to figure out what's taking so long. I've tried some fairly extreme things, like overriding the paintComponent, PaintComponents, paintChildren, paint, repaint, validate, revalidate, and validateTree methods in the panel with no-ops to try to figure out what's taking so long, but to no avail. I've tried validating the JPanel before adding it, but that has no effect. If I override the addImpl method of the scroll pane, that makes things quick, but it doesn't really help narrow things down much. Can anyone help?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!