i have 3 buttons: b1,b2,b3. What im trying to do is is when you click on the button it will use drawString to write what button you clicked. Im using AWT .
Here is the code i have so far.
The problem is that i cant figure out how to get it to use drawString. I tried using repaint() but i dont think i did it correctly. Im am a newb at this. I put in the paint method-> if(source == *button name here*) and then typing the g.drawString and i put repaint() in actionPerformed but it wouldnt work. Compiled correctly though. Hope you understand what im asking. Thanks ahead, -Clay
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Mar 16, 2005
Thanks. This helps some. I'll look it over and update my code. What i have to do is create an applet showing what we learned in class. I have 3 buttons(Java, Html, Unix) that when you click will print text on the screen giving examples and such of each. That class that i posted was just a test thing to try to get it to work.