Created
April 10, 2013 21:20
-
-
Save tonetheman/5358538 to your computer and use it in GitHub Desktop.
Java file to show when paintComponent is being called.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import javax.swing.*; | |
class DrawPanel extends JPanel { | |
public void paintComponent(final Graphics g) { | |
System.out.println("paintComponent called now!"); | |
} | |
} | |
public class Crud { | |
public static void main(String[] args) { | |
JFrame f = new JFrame("testing"); | |
f.setSize(300,300); | |
f.add(new DrawPanel()); | |
f.setVisible(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment