Results 1 to 11 of 11
  1. #1
    Corrrrr is offline Member
    Join Date
    Mar 2012
    Posts
    15
    Rep Power
    0

    Default NEED HELP!!! JOptionPane and arrays

    So I want to display a 2d array in a JOptionPane window rather than on the console.
    How would I go about doing this? I can provide code that I have to assist with any confusion.

    Please help meh!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: NEED HELP!!! JOptionPane and arrays

    You could post the output in a JTextArea, put that JTextArea in the JOptionPane as the Object parameter, and display the JOptionPane. Also, you'll want to use fewer exclamation points in your questions here. Please.

  3. #3
    Corrrrr is offline Member
    Join Date
    Mar 2012
    Posts
    15
    Rep Power
    0

    Default Re: NEED HELP!!! JOptionPane and arrays

    Thank you very much.
    Would you happen to have any example code for such an idea?

    I will try to contain my excitement for Java.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: NEED HELP!!! JOptionPane and arrays

    Quote Originally Posted by Corrrrr View Post
    Thank you very much.
    Would you happen to have any example code for such an idea?
    It's much better if you try to create the code yourself and then come here if you get stuck. You'll learn much more this way, trust me.

    I will try to contain my excitement for Java.
    Thanks. We're no different than anyone else -- we don't like being SHOUTED at, and so we appreciate your future courtesy.

  5. #5
    Corrrrr is offline Member
    Join Date
    Mar 2012
    Posts
    15
    Rep Power
    0

    Default Re: NEED HELP!!! JOptionPane and arrays

    Ok. Thank you for the advice.
    I came here because I've been trying to get it on my own for a couple hours now...
    but I suppose I will continue trying.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: NEED HELP!!! JOptionPane and arrays

    Quote Originally Posted by Corrrrr View Post
    Ok. Thank you for the advice.
    I came here because I've been trying to get it on my own for a couple hours now...
    but I suppose I will continue trying.
    And I've told you how to do it. So now why not give it a go.

  7. #7
    Corrrrr is offline Member
    Join Date
    Mar 2012
    Posts
    15
    Rep Power
    0

    Default Re: NEED HELP!!! JOptionPane and arrays

    Well that's what I'm doing silly

  8. #8
    Corrrrr is offline Member
    Join Date
    Mar 2012
    Posts
    15
    Rep Power
    0

    Default Re: NEED HELP!!! JOptionPane and arrays

    So how exactly does JTextArea work?

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: NEED HELP!!! JOptionPane and arrays

    Quote Originally Posted by Corrrrr View Post
    So how exactly does JTextArea work?
    Have a drink at the well: How to use Text Areas

  10. #10
    Corrrrr is offline Member
    Join Date
    Mar 2012
    Posts
    15
    Rep Power
    0

    Default Re: NEED HELP!!! JOptionPane and arrays

    Haha thanks, I'll drink up

  11. #11
    fatabass is offline Senior Member
    Join Date
    Nov 2011
    Location
    Turkey
    Posts
    380
    Blog Entries
    24
    Rep Power
    3

Similar Threads

  1. Casting Enum Type arrays to object type arrays
    By nmvictor in forum Advanced Java
    Replies: 4
    Last Post: 02-17-2012, 12:49 PM
  2. Help with JOptionPane
    By javaman1 in forum New To Java
    Replies: 6
    Last Post: 11-13-2010, 10:40 PM
  3. Arrays.sort... why sorting all arrays in class?
    By innspiron in forum New To Java
    Replies: 6
    Last Post: 03-23-2010, 01:40 AM
  4. need help with a JOptionPane
    By dr4g0nk1ng in forum Advanced Java
    Replies: 2
    Last Post: 02-19-2010, 09:40 PM
  5. JOptionpane
    By tommyyyy in forum New To Java
    Replies: 2
    Last Post: 03-20-2009, 08:33 AM

Posting Permissions

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