import javax.swing.*;
import java.awt.*;

public class JOptionPane1
{
    public static void main(String[] args)
    {
    Object[] o={"Turhan","İrfan","Defne","Meral","Hatice","Osman","Nurhan","Selin","Gürkan"};
    ImageIcon picture=new ImageIcon("fall.jpg");
    String name=(String)JOptionPane.showInputDialog(null,"Please select a name : ",
    "JOptionPane example",JOptionPane.QUESTION_MESSAGE,picture,o,"Turhan");
    String s1="selected name="+name;
    String s2="JOptionPane example";
    JOptionPane.showMessageDialog(null,s1,s2,JOptionPane.PLAIN_MESSAGE);
    }
}