Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Background image for JPanel using UI Properties

843806Jan 31 2008 — edited Feb 1 2008
Is there any way to add background image for JPanel using UI Properties,

code is

if (property.equals("img")) {
System.out.println("call image file in css"+comp);
//set the background color for Jpanel
comp.setBackground(Color.decode("#db7093"));

}

here the comp is JPanel and we are setting the background color,
Is there any way to put the Background image for the JPanel ????
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 29 2008
Added on Jan 31 2008
3 comments
486 views