I have tested the trick given here
BlackBerry Fixed Width ButtonField (also here
http://www.blackberryforums.com/deve...set-width.html)
... plus adding a Style so can be centered
my idea was to make it 30 pixels less than the screen width
so.. I have this
Code:
public class FixedWidthButtonField extends ButtonField{
private int width;
FixedWidthButtonField( String label, int Width){
super( label, ButtonField.FIELD_HCENTER);
width = Width;
}
public int getPreferredWidth(){
return width;
}
}
and in the screen
Code:
...
FixedWidthButtonField _bf = new FixedWidthButtonField("Test", Display.getWidth() - 30);
add(_bf);
...
with this I get the button centered, by the text in it isnt centered!!
Im using JDE 4.5.0
any ideas??
Thanks in advance...