How to create anchor between two panels in netbeans
Hi Folks,
I have created two panels one below the other(vertically) with anchor using GridBagLayout.
First panel is image which size varies(increases and decreases vertically).
Second panel contains info about the above image.
Now my problem is there is lot of space between first panel of image and second panel of info. I want to reduce the space between the two panels programatically. I'm using netbeans IDE for this.
Pls suggest me solution for this.
Thanks,
Joe
[517 byte] By [
joe.javaa] at [2007-10-3 10:19:38]

Don't know why you would have a problem. The components are usually painted right below one another. So something is wrong with your code.
You could try using a [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]Box Layout[/url].
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the code retains its original formatting.