Hi, How do I set background color for applet? thanks, Alex
All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
posted 15 years ago
setBackground(Color.white) Use the following if it's a panel on top of another panel. pnlName.setBackground(Color.white) you can replace white with any of the 11 standard colors in the API. You can also create your own color. Color giveItAName = new Color(50,100,150) 50, 100, 150 represents R,G,B values. You would then use. setBackground(giveItAName) or pnlName.setBackground(giveItAName) Keep in mind that if you set a color on a panel to �yellow�all panels added to that panel will also be yellow, unless you change the color of the that panel by prefixing the setBackground method with the panel name. Regards, Hugh
[This message has been edited by Hugh Savoie (edited October 16, 2001).]
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads