LWUIT: Styling a Button
问题 I have a J2ME LWUIT app and I'm trying to change the width and background color of a button. The button is in a BoxLayout. I'm using code like this: btnLogout.setPreferredW(210); btnLogout.getStyle().setFgColor(0x00dcc5); btnLogout.getStyle().setBgColor(0x302d36); Only the setFgColor line seems to work. The width remains unchanged and the background remains white. How can I change the style of the button? I haven't had this problem with other components (labels, text fields, etc...) 回答1: If