0
import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

class MyDrawPanel extends JPanel {

public void paintComponent(Graphics g) {

    g.setColor(Color.orange);
    g.fillRect(20, 50, 10, 100);

}

}

Tell me how to execute this code in eclipse

Robert
  • 5,278
  • 43
  • 65
  • 115
Atul Rai
  • 332
  • 1
  • 10
  • 25

1 Answers1

0

Try the standard shortcut: Ctrl + F11

madhead
  • 31,729
  • 16
  • 153
  • 201
Programmer
  • 445
  • 4
  • 12