// Method to draw on the view @Override public void paint(Graphics g) { Graphics2D g2D = (Graphics2D) g; // Get a 2D device context for (Element element : theApp.getModel()) { // For each element in the model element.draw(g2D); // ...draw the element } }