2 Replies Latest reply on May 16, 2008 4:50 PM by 843851

    How to make transperent widget.

      Hi all,

      I am new to this xlet things and it has been long time since I worked on java. so, this might have a simple solution which I am overlooking.
      I have HStaticIcon in the background and trying to put HStaticText on the top. I want to make static text background transperent so, All I want see is text and background image.

      Is there any way I can do it?

        • 1. Re: How to make transperent widget.
          Text elements have a method that allows you to choose how you want to draw the background. You get what you need with the .setBackgroundMode() method. More exactly with something like
          HStaticText example = new HStaticText(the constructor you need);
          Try to get a good color combination or text size so you can still read the text after this change.
          • 2. Re: How to make transperent widget.
            Thanks for the reply. This is what I was doing and did not work but after your replay I looked at the code again and there were 2 constructors and I was only adding it to one constructor which was not being called . Adding to both fixed the problem.

            Thanks again.