2

I am adding a button to a panel using Miglayout, and try what I might, I cannot get it to go to the right end of the panel. It insists on going flush left. Oddly, the demo is kind of short on such on a example (it only shows it in the context of other buttons on the same panel.

I have a panel like this:

    dialog
      ->complex display retrieved from another class
                                               OK Button here.

Except that it always insists on putting it like this:

    dialog
      ->complex display retrieved from another class
    OK Button here.
kleopatra
  • 51,061
  • 28
  • 99
  • 211
Yishai
  • 90,445
  • 31
  • 189
  • 263

2 Answers2

4

OK, I got the answer to this (finally). When adding the panel that contains the button add the component constraint of "gapbefore push." I had been trying that, but only on the button itself, not the panel.

Yishai
  • 90,445
  • 31
  • 189
  • 263
1

panel.add(button, "skip(the amount of cells you have), al 100%")

ndfkj asdkfh
  • 316
  • 1
  • 5
  • 15