Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This work is licensed under a Creative Commons Attribution 3.0 Unported License, available
- * at http://creativecommons.org/licenses/by/3.0/
- *
- * Please attribute by not editing the @author lines in any location on the source code.
- * Last modified 1/6/2013
- */
- import java.awt.Color;
- import java.awt.Graphics;
- import javax.swing.JComponent;
- /**
- * This is a test to see how fast a JComponent can render a simple
- * square. This tests with and without BufferedStrategy's.
- *
- * @author /u/Tjstretchalot
- */
- public class JComponentTest extends JComponent {
- /**
- *
- */
- public JComponentTest(boolean doubleBuf) {
- setDoubleBuffered(doubleBuf);
- }
- public void paintComponent(Graphics g) {
- g.setColor(Color.RED);
- g.fillRect(100, 100, 100, 100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement