This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
If you are talking about on the title bar of a JDialog, that is set to be the same as the icon on the title bar of the JDialog's parent Frame. To change the icon on the JDialog's parent Frame, call setIconImage( Image ) on it.