Hi, just a quick question, why dont all of my components show up on this form? After I get the rest of the components to show up I need to take the input from all of the textboxes and paint the results. I can get the text and put it together in a string but I was wondering, do you suggenst that I make this in two panels. One for the labels and text fields and one for the area I intend to paint with the drawString() method? I guess I am asking this because in one of my previous posts someone told me to be sure that I know where I am painting to. I was just wondering what is the best way to control this. I do know how to locate the graphics object with x, y. See how I can turn one question into two? Thanks everyone for your help. Im enjoying learning this stuff. Here is the code for the labels and text boxes. For some reason only the top two are showing up when I run it.
Hi Mike, With your code, I am can view all the components you have added to the applet. If you want to display the information in the textfields on the applet, it would be better using a Label, and use setText() on that Label. It would be better not to implement the paint() method, because it would degrade the performance.
Joined: Oct 19, 2003
Thanks for the reply vijay! Why is it that no matter what I did last night I could only see the top two items on my applet and not the other four. I tried recompiling it twice. Thats strange. BTW the reason I want to use the paint() method is only because that is what is specified in the assignment that I am curently working on. Do you have any suggestions?