I have a JPanel with a Grid Layout. In the \"cells\" of the grid I can put different elements (for example JButtons). There is no problems with that. But now I want to put a
/***Your Code***/ public void paintComponent(Graphics g){ /***Your Code***/ g.setColor(Color.RED); g.fillOval(50,50,20,20); } g.fillOval(x-axis,y-axis,width,height);