Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class DrawPanel extends JPanel {
- protected void paintComponent(Graphics g) {
- super.paintComponent(g);
- g.setColor(Color.GREEN);
- g.fillRect(x, y, 50, 50);
- }
- public Dimension getPreferredSize() {
- return new Dimension(D_W, D_H);
- }
- }
Add Comment
Please, Sign In to add comment