Miglayout,label center align?
Java
1
Posts
1
Posters
0
Views
1
Watching
-
Im having trouble aligning label to center top of the panel Im Using MigLayout and tried following things but didnt worked lbl is my label which I want to align in center top. Code1
panel.add(lbl,"wrap,align center");
Code2
lbl.setHorizontalAlignment(JLabel.CENTER);
Thanks in advance. EDIT: I think I have found the answer
panel.add(lbl,"wrap,dock north");