Skip to main content

Need to remove border of a Button

2 replies [Last post]
raki_j2me
Offline
Joined: 2009-09-06

Hi Guys,

I have lots of buttons with images in a form - I need them without a Border - I have tried this :-

Button b = new Button("", unselectedImages[i]);

b.getStyle().setBorder( Border.createEmpty( ) );

but this is not working for a button but works for Text Area.............

Help required guys........................

Regards
Raki

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
raki_j2me
Offline
Joined: 2009-09-06

Hey thanks man.............i knew about the LWUIT Resource Editor Designer........its working fine for me.........so problem solved..........thanks a lot

shankar_vn
Offline
Joined: 2009-11-03

[code]
b.getSelectedStyle().setBorder( Border.createEmpty( ) );
b.getUnselectedStyle().setBorder( Border.createEmpty( ) );
[/code]

Above code works for me to remove borders(But border will appear while pressing the button). If you don't want Borders for all Buttons you can simply do the same in LWUIT designer itself. Create empty border for selected, unselected, pressed styles.

Best regards,
Shankar