Adicione application.setVisible(true);
na sua turma DrawPanelTest
public class DrawPanelTest {
public static void main(String[] args) {
// create a panel that contains our drawing
DrawPanel panel = new DrawPanel();
// create a new frame to hold the panel
JFrame application = new JFrame("Drawing Diagonals");
// set the frame to exit when closed
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
application.add(panel); // adds panel to the frame
application.setSize(300, 300); // set the size
application.setVisible(true);
}
}