How to Add Text and Image Both in a SWT LABEL
问题 Is there any way to add Text and Image in SWT label in a single line. Once I add image, text goes off. 回答1: No you can't have an image and text simultaneously in a Label (unless you custom draw it). Else use org.eclipse.swt.custom.CLabel : Code: import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class LabelTest {