How do I put an icon on the top left hand corner of a JDialog , as we can do so in a JFrame? I know we can do it thru JOptionPane but my JDialog has some buttons which I don't want to remove, so I can't think from that point of view. Any suggestions?