Miglayout,label center align?

Page 1 of 1

1 Replies - 291 Views - Last Post: 29 August 2013 - 07:53 PM Rate Topic: -----

#1 chdboy  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 135
  • Joined: 26-July 12

Miglayout,label center align?

Posted 28 August 2013 - 08:27 PM

I'm having trouble aligning label to center top of the panel
I'm Using MigLayout and tried following things but didn't worked
lbl is my label which I want to align in center top
panel.add(lbl,"wrap,align center");

Code 2
lbl.setHorizontalAlignment(JLabel.CENTER);

Thanks in advance.

EDIT:

I think I have found the answer
panel.add(lbl,"wrap,dock north");

This post has been edited by chdboy: 28 August 2013 - 09:11 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Miglayout,label center align?

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8346
  • View blog
  • Posts: 31,904
  • Joined: 06-March 08

Re: Miglayout,label center align?

Posted 29 August 2013 - 07:53 PM

And we are supposed to support third library package ? We have enough job debugging standard Java API classes
If it is a MigLayout problem go to MigLayout forum or check that Quick Strat Guide

http://www.miglayout.../QuickStart.pdf

This post has been edited by pbl: 05 September 2013 - 06:58 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1