MiGLayout will not expand JPanel down

后端 未结 1 1070
长发绾君心
长发绾君心 2021-01-21 22:12

As I am sure some of you are aware, I am attempting to make an alernative tool to Tiled that is open source. I asked before what layout I should use and I was suggest the MiGLay

1条回答
  •  广开言路
    2021-01-21 22:33

    Needed to set the sidebar and map area in the area by using the docking feature.

    For example I did as follows:

    this.setLayout(new MigLayout(
        "fill",  // Layout
        "",         // Column
        ""));       // Row
    this.add(map, "width 400:600:, dock center, growy");
    this.add(sideBar, "width 250:300:350, dock east, growy");
    

    This got rid of gaps and expanded everything as needed.

    0 讨论(0)
提交回复
热议问题