Skip to main content

lable with both text and icon

1 reply [Last post]
cathye
Offline
Joined: 2012-08-05
Points: 0

hi. i am new program writer in lwuit in net beans IDE.
please help me about creating a label with text and icon both .
thanks so much.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
harsha921
Offline
Joined: 2012-09-07
Points: 0

hi cathye,

you can try the following.

Label l=new Label("label");
Image img=null;
try {
img=Image.createImage("/image.png");
} catch (IOException ex) {
}
l.setIcon(img);

Regards,
harsha.