• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

List Chooser Panel

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
That feels good. Thanks. Here's a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic