java - How can I align these JPanels on the bottom of the surrounding JPanel? -


i learning use swing please bear me. have @ attached screenshot:

jframe

these jlabels within jlabel within jframe. move these inner jlabel (which randomly generated in size , color @ runtime) bottom though books on shelf. know layout managers, though can't quite seem find proper 1 want. screenshot shows result of specifying none, should default flowlayout.

the inner jlabels .add()ed without placement done. setlocation appears nothing whatsoever.

can me out?

if i'd add put jlabels inside of jpanel boxlayout align border layout. here code out:

jlabel outer = new jlabel(); outer.setlayout(new borderlayout(0,0)); /** add inner jlabels here. other add them order appear right**/ jpanel bookshelf = new jpanel(); bookshelf.setlayout(new boxlayout(toolbar, boxlayout.x_axis)); //add jlabels bookshelf outer.add(bookshelf, borderlayout.south); 

here great tutorial on layout managers. here ui designed similar think want.

hope helps out.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -