This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What should I do to use the paint method more than once?  RSS feed

 
Michael Wal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, this is my first question on this forum, I am new. What I wanted to know is, if I want to paint something in one class and then paint another thing in a different class, how should I do this with the method? I was told to use paintComponent but don't quite know what it is ... I appreciate all help
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
probably best to go through this first, then re-post with any problems/questions

http://docs.oracle.com/javase/tutorial/uiswing/painting/index.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!