将单元格合并为MigLayout?

huangapple 未分类评论42阅读模式
英文:

Combine cells to MigLayout?

问题

  1. JPanel jPanelAccOil = new JPanel(new MigLayout("", "0[]0", "0[]0"));
  2. jPanelAccOil.add(new JPanelInAI(null, "",
  3. sistema.getGestorComunicacioOPC().getParametresOPCHyperG().getActuatorOilPressure()));
  4. this.add(jPanelAccOil, "cell 2 3");
  5. JPanel jPanelAccPneumatic = new JPanel(new MigLayout("", "0[]0", "0[]0"));
  6. jPanelAccPneumatic.add(new JPanelInAI(null, "",
  7. sistema.getGestorComunicacioOPC().getParametresOPCHyperG().getAccPneumaticPressure()));
  8. this.add(jPanelAccPneumatic, "cell 3 3, wrap");
英文:

How to combine two cells using MigLayout?

I have two cells, as shown in the following code. I want to combine them, what do I have to do?

  1. JPanel jPanelAccOil = new JPanel(new MigLayout("", "0[]0", "0[]0"));
  2. jPanelAccOil.add(new JPanelInAI(null, "",
  3. sistema.getGestorComunicacioOPC().getParametresOPCHyperG().getActuatorOilPressure()));
  4. this.add(jPanelAccOil, "cell 2 3");
  5. JPanel jPanelAccPneumatic = new JPanel(new MigLayout("", "0[]0", "0[]0"));
  6. jPanelAccPneumatic.add(new JPanelInAI(null, "",
  7. sistema.getGestorComunicacioOPC().getParametresOPCHyperG().getAccPneumaticPressure()));
  8. this.add(jPanelAccPneumatic, "cell 3 3, wrap");

答案1

得分: 3

你可以用以下方式跨足格:

  1. 跨足 2

尝试这样做:

  1. JPanel jPanelAccPneumatic = new JPanel(new MigLayout("", "0[]0", "0[]0"));
  2. jPanelAccPneumatic.add(new JPanelInAI(null, "",
  3. sistema.getGestorComunicacioOPC().getParametresOPCHyperG().getAccPneumaticPressure()));
  4. this.add(jPanelAccPneumatic, "cell 3 3, 跨足 2, 换行");
英文:

You can use to span cells:

  1. span 2

try this:

  1. JPanel jPanelAccPneumatic = new JPanel(new MigLayout("", "0[]0", "0[]0"));
  2. jPanelAccPneumatic.add(new JPanelInAI(null, "",
  3. sistema.getGestorComunicacioOPC().getParametresOPCHyperG().getAccPneumaticPressure()));
  4. this.add(jPanelAccPneumatic, "cell 3 3, span 2, wrap");

huangapple
  • 本文由 发表于 2020年7月24日 18:50:50
  • 转载请务必保留本文链接:https://java.coder-hub.com/63072091.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定