I'm setting the layout of a panel that inherits from JPanel using Mig Layout, but the cell constraints aren't working like I expected for one of the components I'm trying to add. I want the components to be on top of each other, one column and three rows. The third component ends up right next to the second one instead of in the following row. What am I doing wrong?
roundedPanel = new RoundedPanel(); //inherits from JPanel
registerPanel = createRegisterPanel(); //returns a JPanel
lblIcon = new JLabel();
setupLicenseInfoLabel(); //sets text of and initializes registerLabel
roundedPanel.setLayout(new MigLayout("fill, insets " + RoundedPanel.RECOMMENDED_INSET, "[]", "[][][]"));
roundedPanel.add(lblIcon, "cell 0 0");
roundedPanel.add(licenseInfoLabel, "cell 0 1");
roundedPanel.add(registerPanel, "cell 0 2");
edit: I realized that I had the MigLayout row and column arguments mixed up, but even when I tried this, I still had the same problem.
roundedPanel.setLayout(new MigLayout("fill, insets " + RoundedPanel.RECOMMENDED_INSET, "[][][]", "[]"));
edit 2 : I added flowy to the MigLayout constraints, and things all displayed how I intended. I'm not sure what the original problem was and why wrap didn't help.