Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Developer
Posts: 39
Registered: ‎02-21-2012
My Device: Blackberry 9300
My Carrier: Developer

setting transparency for browserfield

In my application,I am adding browserfield to a screen which have background image..but browserfield show white color.so how to give transparency for browserfield?

BlackBerry Development Advisor
Posts: 15,852
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: setting transparency for browserfield

You'll need to set this within the HTML being displayed in the BrowserField.  The default background for HTML is white, which is what the BrowserField is using.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Contributor
Posts: 7
Registered: ‎12-14-2011
My Device: 2010 - Bold
My Carrier: Vodafone In

Re: setting transparency for browserfield

I have set HTML page's background with transparent image like,

<body background="transparent.png" >


also made BrowserField's background transparent like,

browserField.setBackground( BackgroundFactory.createSolidTransparentBackground(Color.WHITE, 1));


but still it will showing html page's default white background which is hiding my MainScreen's background image.  Can you please provide some code which descibes how you have achieved transparency through HTML page's background property?

Posts: 243
Registered: ‎07-22-2011
My Device: BlackBerry Z10
My Carrier: AirTel

Re: setting transparency for browserfield

[ Edited ]



Actually in our BB java we can give image name directly but acc to html we have to specify img location if u r not giving any location it takes as current location but current lication means here no answer, for the browser field transperent if u r using JRE above 6.0 then u can write opacity it is one of the property, but it will not work jre 5.0


take a look into this link




Lakshman K

Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

New Contributor
Posts: 7
Registered: ‎12-14-2011
My Device: 2010 - Bold
My Carrier: Vodafone In

Re: setting transparency for browserfield

Giving image name for HTML page's background is sufficient. Put image & html files into "res" folder and load that html page into BrowserField.

I'm looking for a solution that would also work before OS version 6.0 

Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve
My Carrier: compny

Re: setting transparency for browserfield


I have seted the background image through HTML it is working fine

              but MY Problem is that  if browser field data is increasing the screen size and while I am scrolling the manager, for the few second it is showing the default white background color and then the background image is overlapping it. Show can we solve this problem (displaying white background color) if any body know please let me know.