This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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