• Post Reply Bookmark Topic Watch Topic
  • New Topic

Optimization : Setting Component within JScrollPane  RSS feed

Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application, on different selections over tree control, I give different
display to the right of split pane.
Display to the right is added within JScrollPane. For every change in selection
within a tree control, in method valueChanged having TreeSelectionEvent, I instantiate
JScrollPane with Component to be displayed,as a parameter to JScrollPane constructor.
My problem is, for an optimization I want to avoid instantiating object of JScrollPane,
with change in selection of Tree Node.
I havent found any method called, scrollPaneObject.setComponent(myComponent);
As well scrollPaneObject.setViewportView(myComponent); doesnt serve my objective,
since it merely adds as a child view over existing view.
Can anyone help me out, in eliminating instantiating scrollPaneObject, with
change in tree selection ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!