Well, for the addComponent(Component,int,int) method, the user will have to compute those manually because how else will the layout know where to put the components? For the addCenter(Component,int)...
Type: Posts; User: aussiemcgr
Well, for the addComponent(Component,int,int) method, the user will have to compute those manually because how else will the layout know where to put the components? For the addCenter(Component,int)...
Ok, I made a main and updated the code, and I found a small change I had to make with one of the methods (clearly didnt extensively test it enough), so its a good thing I did.
Ok, so continuing with this, I have made some changes that might make it more usable. I could use some suggestions and some feedback.
import javax.swing.SpringLayout;
import java.awt.Container;...
Cant get those to work. They just return 0... Thats the reason I couldnt get the addCenter method going...
I believe those methods only work if you give the components preferred sizes, which i...
Well, since my layout uses SpringLayout, the other elements can be offset relative to the other elements.
Now if the problem is inserting a row on components on the top, I'm sure I could put in a...
Back when I made it, I was going to add a method to do that, but I couldn't figure out how to get the width/height of the components.
I've found manually computing them isn't much of problem...
NOTE: UPDATED CODE A FEW POSTS DOWN
So a few months ago I got really annoyed with the stupidity of all of the layouts Java supplies for organizing components. I said to myself, why cant I just...