Skip to main content

Form Style Code just aint cooperating!!!!!!

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
amuche
Offline
Joined: 2011-09-05

if i hav a form with a background color of say black and place components on the form..the background color or image is no longer seen

I am stil new into lwuit though..I need help in making the background color or image of the form to be seen even when components

fill up the screen with their own background colors....It is even worse bcos i dnt even no hw to add two colors to a form or component using code method instead of the

resource editor since for now am comfortable with the code method..its realy urgent!!!!can any1 help me plis..?? tried this:

Display.init(this);

Form me=new Form();

me.getstyle.setBgcolor(0X000);

Label place=new Label("Welcome");

place.getstyle.setBgcolor(0x567648);

me.addComponent(place);

me.show();

and then i cant see the balck color of ma form cos the blue has covered it all..just how can i add two colors using code methodds

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

If you don't want the blue color to appear just set the bgTransparency attribute of the label to 0.