This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTree / Resizable question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree / Resizable question" Watch "JTree / Resizable question" New topic

JTree / Resizable question

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
Hi, guys, I have two questions about Swing
1. about JTree. how can I select one JTree node and right click to pop up a menu ? Please give me a simple example.
2. about Resizable. How can I keep the JFrame and its child component resizable when it is maximumed or resized ?
I have tried form editor of the Sun One studio. I like to use the nullLayout in the bottom-level JFrame so that I can easily drag the component, usually , JPanel to place I like. and then I use GridLayout in the child component. I found this way is easy for me. But I found I lose the Resizable. Anybody can share your experience in using Form Editor?
I agree. Here's the link:
subject: JTree / Resizable question
It's not a secret anymore!