Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set background theme using png file?

 
vani prahalathan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using lwuit ,is there any possibilities to set the image for background using png file.???

Help me please..


Vani.P
 
Srinath Gamage
Ranch Hand
Posts: 40
Google App Engine Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can. Insert the png to theme. Hope you are trying to add it to form background.
 
vani prahalathan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to insert the png file to theme?i want to add to it form background.

please tell me the steps...

i already tried.see this following code.

Code:
Form f = new Form();
f.setTitle("Hello World");
com.sun.lwuit.Image green_bar=null;
try{
green_bar = com.sun.lwuit.Image.createImage("/scenary.PNG");
System.out.println("hello");
Label pictureLabel = new Label(green_bar);
f.addComponent(pictureLabel);
}catch(IOException e){}
f.show();
f.show();
}

IT DISPLAYS WHITE SCREEN
 
Srinath Gamage
Ranch Hand
Posts: 40
Google App Engine Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a resource file editor with LWUIT kit. From there add a background to label.
Then it will be automatically added to labels you create in code.
 
vani prahalathan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you ..its working fine.i added the background image to form.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic