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

how to add Jtree object in JInternal frame?  RSS feed

 
krishna balaji
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tired this following code but the tree is not visible on the internal frame
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Try changing this into the following:

The tree already had a parent, the scroll pane's view port (which has the scroll pane as its parent). When you try to add it to a new parent, things go wrong.
Instead of adding the tree itself again, you should add the scroll pane, which contains the tree.

You should also ignore the bounds and visibility. The parent panel (PanelResourceWindow) will take care of the bounds of the scroll pane through its layout manager. The visibility will be set as the parent PanelResourceWindow becomes visible or invisible.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!