[英]How do I get a button to align to the right in MigLayout
我正在使用Miglayout向面板添加按鈕,然后嘗試嘗試,但我無法將其移至面板的右端。 它堅持要向左沖。 奇怪的是,該示例在該示例上有點簡短(它僅在同一面板上其他按鈕的上下文中進行顯示。
我有一個這樣的小組:
dialog
->complex display retrieved from another class
OK Button here.
除了它總是堅持這樣說:
dialog
->complex display retrieved from another class
OK Button here.
好的,我終於得到了答案。 添加包含按鈕的面板時,添加“ gapbefore push”的組件約束。 我一直在嘗試,但是只在按鈕本身而不是面板上。
panel.add(button, "skip(the amount of cells you have), al 100%")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.