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,231
  • 43
  • 62
  • 114
Atul Rai
  • 324
  • 1
  • 8
  • 23

1 Answers1

0

Try the standard shortcut: Ctrl + F11

madhead
  • 28,732
  • 15
  • 145
  • 186
Programmer
  • 445
  • 4
  • 12