i simply implemented class that inherits JPanel like below
public class Orpanel extends JPanel { .... @Override public void paintComponent(Graphics
Sounds like you're just using the wrong methods. You should be doing this when adding a panel to a frame:
frame.getContentPane().add(panel) ;