• Post Reply Bookmark Topic Watch Topic
  • New Topic

List Chooser Panel  RSS feed

 
vinaya kumar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
My Panel should look as below

1) Scroll Pane A
which has in it a JTree structure
2) A Panel B
which has in it 4 Buttons,
AddAll,Remove,RemoveAll.
3) A Scroll Pane C
which is alist of items ,i have selected from
the A(hmm! the Tree)
4) A Panel D
which has two buttons ( for moving
the elements in C ,up and Down)
the logic of the things works proper
I use Forte to Draw this and then change the layout to GridBag.
now my problem is!!
i am not able to align the same.
i.e

Lets call the whole set has listchooserPanel.

i have two panels
1)List ChooserPanel
2) A panel with a label and a textfield
i am not able to align the listchooserpanel
starting to start of label.

Any clue why this problem.
Is there any Listchooser class ,for my requirement
in Java
Thanks and Regards
vinaya
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vinaya,
Without actual code it is hard to tell, but you should look at the anchor variable of the GridBagConstraints. It is usually the one that aligns things. For example, if we want to left align a label and a textfield:

The above code will result in a label directly above a textfield and both aligned on the left side.
Regards,
Manfred.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!