This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes GridBag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "GridBag" Watch "GridBag" New topic
Author

GridBag

lakshmi nair
Ranch Hand

Joined: Oct 11, 2000
Posts: 63
The above code displays 5 buttons. What i want is the second should begin at a position half from the first. I wrote this expecting a result like that. What change must i make?

Thanx
Lakshmi
Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Lakshmi,
Thanks. Ur question made me know more about GB.
Did u find out how to do..... Coz from 1 whole day I'm experimenting on grid bag layout but I could not get exactly the o/p.
Do lemme know if u find out something... mean while lemme experiment more.....
Aruna
Viji Bharat
Ranch Hand

Joined: Sep 18, 2000
Posts: 101
Lakshmi:
If I have understood you correct, you are looking to implement something like this
<button1>
<button2> (button2 is right below button1 and its left edge starts exactly at the center of button1)
<button3> (button3 should be right below button2 and its left edge should be exactly at the center of button2)
etc. I haven't been able to do that!!
However I tried other possibilities. The code given below meets your requirements to some extent, I think!

[This message has been edited by Viji Bharat (edited November 22, 2000).]
lakshmi nair
Ranch Hand

Joined: Oct 11, 2000
Posts: 63
Hi Aruna, Viji
I didnt try it further and as you see there are not many replies. Viji's code does not work correctly with me, i dont know why. Anyway less tensed, gave the test today and passed with 83. Time for lot of experiments now!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GridBag
 
Similar Threads
Depth first search recursive, problem on graph[picture + code]
static method not running
Using Anchor in GridBagLayout
ActionListener not recognized under Solaris
Gridbag span columns problem