• Post Reply Bookmark Topic Watch Topic
  • New Topic

to be more specific  RSS feed

 
Adam Craig
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to be more specific i want to use my own custom icon in a JOptionPane.showInputDialog dialog..
i have had loads of contacts telling me how to do it using java.awt.Frame..however my usage is of the type:
String answer;
answer =
JOPtionPane.showInputDialog(
"Please enter the current date");
now can you see the problem?
i know examples such as:
ImageIcon ico = new ImageIcon("drag2.jpeg");
Frame frame = new Frame();
Object[] options = {"Yes, please",
"No, thanks",
"No eggs, no ham!"};
JOptionPane.showInputDialog(frame,
"What some eggs ?.", "My title",JOptionPane.ERROR_MESSAGE,ico,options, options[2]);
will work but that isn't a usefull input style for
my proggie
can anyone help please pretty please
adambi
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String[] options = {"Yes, please", "No, thanks",
"No eggs, no ham!"};
Icon ico = new ImageIcon("drag2.jpeg");
JOptionPane.showInputDialog(null, What some eggs ?.", "My Title", JOptionPane.ERROR_MESSAGE, ico, options, options[2]);
What about it is not a useful style?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!