Skip to main content

BorderLayout.SOUTH

1 reply [Last post]
heziflash
Offline
Joined: 2008-06-03
Points: 0

Hi

How cas i set the image in yhe middle the SOUTH erae?

here is my code:

Label l = new Label("");

l.getStyle().setBgColor(0x0000FF);
l.getStyle().setFgColor(0xFF0000);
l.getStyle().setBgTransparency(120);
try {
//sets the image as the button icon
l.setIcon(Image.createImage("/cig.png"));
} catch (IOException ex) {
ex.printStackTrace();
}
f.addComponent(BorderLayout.SOUTH,l);

f.show();

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chen

Hi,
Try this:
l.setAlignment(Component.CENTER);

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> Hi
>
> How cas i set the image in yhe middle the SOUTH erae?
>
> here is my code:
>
> Label l = new Label("");
>
> l.getStyle().setBgColor(0x0000FF);
> l.getStyle().setFgColor(0xFF0000);
> l.getStyle().setBgTransparency(120);
> try {
> //sets the image as the button icon
> l.setIcon(Image.createImage("/cig.png"));
> } catch (IOException ex) {
> ex.printStackTrace();
> }
> f.addComponent(BorderLayout.SOUTH,l);
>
> f.show();
> [Message sent by forum member 'heziflash' (heziflash)]
>
> http://forums.java.net/jive/thread.jspa?messageID=283246
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net