i think the easiest way to achieve this is use a JLabel with an icon displaying the bitmap. You should write an utility method to create the Icon:
public static ImageIcon createIcon(String iconName) {
URL iconURL = getResource(iconName);
if(iconURL == null) return null;
ImageIcon icon = new ImageIcon(iconURL);
if(icon == null || icon.getIconWidth() == -1) {
System.err.println("Failed to load '" + iconName);
}
return icon;
}
public static URL getResource(String resourceName) {
return Thread.currentThread().getContextClassLoader().getResource(resourceName);
}
Then you say:
JLabel label = new JLabel(createIcon("images/myIcon.gif"));
and all you have to do is place the label in the layout of your dialog.