aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes paint() and repaint() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "paint() and repaint()" Watch "paint() and repaint()" New topic
Author

paint() and repaint()

Jesse Walker
Ranch Hand

Joined: Aug 18, 2004
Posts: 50
Just a quick question, I am trying to build a program that will let you click a button to change the background color of a frame. in my actionPerformed method I have the following

if(ae.getSource() == red1) {
content.setBackground(Color.red)


That is where I am stuck, I know I need to call repaint() but what should I put in the paint() method? I have nothing in it right now but was thinking that I should put the actual code that makes the frame visible is that right??
Thanks in advance
Jesse Walker
Ranch Hand

Joined: Aug 18, 2004
Posts: 50
Nevermind figured out on my own
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: paint() and repaint()