Question

I've been trying to align some objects in my java project in a certain way but with no success. I am using MigLayout for the layout and this is how I would like it to look:

Desired layout

  1. The sidebar should have a static width (220px) and be docked left.
  2. The right column should have a fluid width and expand according to window size.
  3. The footer should be docked to the bottom and have a static height, fluid width.

This is the code that I have got now:

this.setLayout(new MigLayout("fill, wrap 2", "[30%][70%]", "grow"));

this.add(sourceList, "w 30%");
this.add(listView, "w 70%");
this.add(bottomBar.getComponent(), "growx, push, span");

I've been trying to understand the usage instructions but they are hard to understand. I was hoping someone here had knowledge about working with MigLayout and could help me.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top