eclipse - how to display label on composite in swt? -


i want display label on composite. added label can not see on display. code below:

gridlayout parentlayout = new gridlayout(1, true); parent.setlayout(parentlayout);  composite filtercomposite = new composite(parent, swt.none); griddata filtercompositedata = new griddata(); filtercompositedata.verticalalignment = griddata.fill; filtercompositedata.horizontalspan = 2; filtercompositedata.grabexcesshorizontalspace = true; filtercompositedata.grabexcessverticalspace = true; filtercompositedata.horizontalalignment = griddata.fill; filtercomposite.setlayoutdata(filtercompositedata);  label l1 = new label(filtercomposite, swt.none); text t1 = new text(filtercomposite, swt.none);  l1.settext("xxxxxxxxxxx"); 

can show me way this?

you have not set layout on filtercomposite - must set layout on every composite


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -