[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Center a Label in a Node

Hi Cecilia,

you have to change the Layoutmanager of your Node-Figure.
By default this Layout is FlowLayout. You may change it to BorderLayout
and add the label to center.

This should do it:

figure.setLayoutManager(new BorderLayout());
figure.add(label, PositionConstants.CENTER);



Cecilia schrieb:
Hello,
I don't know how to center a label within a node,
thank you very much,
Cecilia.