mport javax.swing.*;
public class Tester {
public static void main(
String[] args) {
JButton yesButton = new JButton("Yes");
JButton noButton = new JButton("No");
Object buttonArray[] = {yesButton,noButton};
JOptionPane.showOptionDialog(null,"Hai","Hai",JOptionPane.YES_NO_OPTION,JOptionPane.PLAIN_MESSAGE,new ImageIcon("test.jpg"),buttonArray,buttonArray[1]);
}
}
Hope this helps for you!
dinesh.