This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I would like to draw graphics (lines, rects, and such) in a JDesktopPane. Below is a snippet of code... desktop = new JDesktopPane(); Graphics g = desktop.getGraphics(); System.out.println("g = " + g); g.drawLine(x,y,xend,yend); g is null and drawLine dies as you might expect (null pointer exception). So, my question is, is it possible to draw directly in a JDesktopPane? If so, how? Thanks, Roger