Results 1 to 2 of 2
  1. #1
    sedk is offline Member
    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Default How can I add an image to a message dialog box

    final ImageIcon icon = new ImageIcon("/Users/derekfitzpatrick/Desktop/image.jpg");
    JOptionPane.showMessageDialog(this, re[roll], JOptionPane.INFORMATION_MESSAGE,icon);
    JOptionPane.showMessageDialog(this, re2[roll2]);
    JOptionPane.showMessageDialog(this, re3[roll3]);



    I tried this.. it didnt work.. help?

    -sed

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: How can I add an image to a message dialog box

    So, what didn't work? It just didn't load your image?

Similar Threads

  1. Replies: 4
    Last Post: 05-15-2011, 05:47 AM
  2. I cant get this Message dialog to appear.
    By dienesh77 in forum New To Java
    Replies: 2
    Last Post: 03-07-2011, 11:03 AM
  3. show Message Dialog
    By akritc in forum AWT / Swing
    Replies: 7
    Last Post: 06-10-2010, 03:49 PM
  4. Replies: 13
    Last Post: 03-20-2010, 02:03 AM
  5. JOptionPane - message dialog
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-17-2007, 10:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •