I want to add two labelfields in a HorizontalFieldManager, I want to show two labels as one left aligned and another right aligned like this

hfm1 = new HorizontalFieldManager(Manager.USE_ALL_WIDTH);
hfm1.setMargin(10,0,10,0);
l1 = new LabelField("Weight:");
l2 = new LabelField("20");
l1.setMargin(0,10,0,0);
l2.setMargin(0,5,0,0);
hfm1.add(l1);
hfm1.add(l2);
Try this code
JustifiedHorizontalFieldManager class is given below-