This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

textfield and drawString method in JApplet  RSS feed

 
j susan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet displays a textfield and recieves the user input. Depending on the input, different messages are to be displayed using the drawString() of the paint method. How do I do it. I tried overriding the paint method and then depending on the input, change messages and call repaint(). Didn't work. Paint() gets called first itself and no textfield appears.
Any help appreciated..
Thanks,
js
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure that you are calling super.paint( g ); at the beginning of your paint() method...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!