Hi! Can anyone tell me how to set textfield background to "white". When i change background of my applet to red, the textfields turns red too. I want them to stay white. I also have a choice, which stays white on applet background change. Why? Best regards, bye
Can you post your code? I tried to recreate the problem you described based off your description, and it didn't happen... the applet has a red background, but the textfield still has a white background...
Also, could you say what platform and version of Java you are working with? I remember a similiar problem I had at one point with AWT comboboxes on the solaris platform... setBackground and setForeground didn't set the areas of the combobox that you would think they pertained to... if this is the problem usually the only solution is to use Swing...
-Nate [This message has been edited by Nathan Pruett (edited July 16, 2001).]
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Meghna ks
Ranch Hand
Joined: Mar 15, 2001
Posts: 122
posted
0
Hi Check the setOpaque property of the textfield. If it is set to false, then it tends to gain the background color of the container(in your case applet). Try setting the TextField opaque property to true. Meghna
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.