Adding JButton to JInternalFrame, grid doesnt work..
Im making this SQL manager GUI software.
Mainly for my own use, but If I succed I'll ofcourse give it out fo free :)
Anyways, I got a problem.
I got this jInternalFrame
And then I do this:
Simply, I create a button in this method. Then I add it to the layerdPane
JButton b = new JButton(name);
JLayeredPane c = (JLayeredPane) DB.getLayeredPane();
GridBagConstraints c1 = new GridBagConstraints();
c1.gridy = initDatabases;
c1.ipadx = 100;
c1.fill = GridBagConstraints.HORIZONTAL;
And the DB (jInternalFrame) is suppose to have GridBagLayout
But it doesnt work because as I have added 3 buttons
Then they should be after eachother, moving down 1 grid for each button.
BUT that doesnt work :(
Idk why but they all end up on same position..
Do you know why? Please reply if you do :)