g2.draw(thePath);

Figure 5