java - How to make GridBagLayout more logical -


i have following code below:

    c.fill = gridbagconstraints.horizontal;     c.gridx = 1;     c.gridy = 0;     config.add(first = new jtextarea(), c);      c.gridx = 1;     c.gridy = 2;     config.add(second = new jtextarea(), c);      c.gridx = 1;     c.gridy = 10;     c.anchor = gridbagconstraints.page_end;      config.add(bottom, c); 

and following screenshot: enter image description here

"bottom" button panel. starters, 2 text fields merged together, , buttons should on bottom. looking @ oracle instructions on gridbaglayout didn't much. ideas?

assuming class extends jpanel calling super(new gridbaglayout()) @ first line of constructor may solve issue...

try adding line c.width=gridbagconstaints.remainder;


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -