LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 427 users online 224593 members 496 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
Solomon Grundy
Cool Things: Sainsbury's home brand Cider. Han...
Mood: Romantic
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
3 online / 25 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

Java Help Wanted Part II
Replies: 9Last Post Oct. 15, 2005 11:08pm by Duekiller
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( knotsotypikal )


Visionary

Patron
Reply
Is it possible to make the JOptionPane dialog boxes show integers instead of strings?

-------
Cinnamon and sugary, and softly spoken lies
You never know just how you look through other people's eyes.

3:43 pm on Oct. 12, 2005 | Joined: Dec. 2004 | Days Active: 394
Join to learn more about knotsotypikal South Carolina, United States | Straight Female | Posts: 1,837 | Points: 8,139
LiveWire Humor
squirellplayingtag


Dairy Product Addict

Patron
Reply
Pass in a integer?

-------
"The most abundant element in the universe is
hydrogen, then second is stupidity."-Harlan Ellison
"What good fortune for our governments that the
people do not think."-Hitler

8:11 pm on Oct. 12, 2005 | Joined: Jan. 2003 | Days Active: 1,260
Join to learn more about squirellplayingtag Maryland, United States | Straight Male | Posts: 6,458 | Points: 27,128
( knotsotypikal )


Visionary

Patron
Reply
Yeah, I think that's what I meant. Pass integers through the parameter, right? Haha, I'm trying!

-------
Cinnamon and sugary, and softly spoken lies
You never know just how you look through other people's eyes.

8:59 pm on Oct. 13, 2005 | Joined: Dec. 2004 | Days Active: 394
Join to learn more about knotsotypikal South Carolina, United States | Straight Female | Posts: 1,837 | Points: 8,139
squirellplayingtag


Dairy Product Addict

Patron
Reply
Yea sure why not?

-------
"The most abundant element in the universe is
hydrogen, then second is stupidity."-Harlan Ellison
"What good fortune for our governments that the
people do not think."-Hitler

7:58 am on Oct. 14, 2005 | Joined: Jan. 2003 | Days Active: 1,260
Join to learn more about squirellplayingtag Maryland, United States | Straight Male | Posts: 6,458 | Points: 27,128
pleaseremove


meh

Patron
Tech Support Leader
Reply
well, you just define int first dont you....

-------
Anyone who isn't confused really doesn't understand the situation
http://craigk.org/pictures/
Can you work out the code?

9:43 am on Oct. 14, 2005 | Joined: Feb. 2005 | Days Active: 1,302
Join to learn more about pleaseremove England, United Kingdom | Straight Male | Posts: 5,945 | Points: 38,178
( knotsotypikal )


Visionary

Patron
Reply
I can get it to show numbers as part of a string, but not integers.

-------
Cinnamon and sugary, and softly spoken lies
You never know just how you look through other people's eyes.

10:33 am on Oct. 14, 2005 | Joined: Dec. 2004 | Days Active: 394
Join to learn more about knotsotypikal South Carolina, United States | Straight Female | Posts: 1,837 | Points: 8,139
squirellplayingtag


Dairy Product Addict

Patron
Reply
Can you give an example?

-------
"The most abundant element in the universe is
hydrogen, then second is stupidity."-Harlan Ellison
"What good fortune for our governments that the
people do not think."-Hitler

10:37 am on Oct. 14, 2005 | Joined: Jan. 2003 | Days Active: 1,260
Join to learn more about squirellplayingtag Maryland, United States | Straight Male | Posts: 6,458 | Points: 27,128
( knotsotypikal )


Visionary

Patron
Reply
JOptionPane.showMessageDialog((array1[index]));

That's the line I'm having problems with. I don't even know if you can do that, but when I try, it tells me the method isn't applicable for the arguments (ints). I even tried using Integer.parseInt. before typing that (it was something our professor told us to do) and it didn't work. Or maybe I'm just trying something that's not possible. Whatever the case, I'm trying to make an array of sorted integers pop up in a dialog box.

-------
Cinnamon and sugary, and softly spoken lies
You never know just how you look through other people's eyes.


10:47 am on Oct. 14, 2005 | Joined: Dec. 2004 | Days Active: 394
Join to learn more about knotsotypikal South Carolina, United States | Straight Female | Posts: 1,837 | Points: 8,139
squirellplayingtag


Dairy Product Addict

Patron
Reply
Have you tried
Code:
JOptionPane.showMessageDialog((array1[index]).tostring);
?
I never personally did much with GUIs and Java, all text bases for AP =(
But have a look at the API http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JOptionPane.html . I'll be back later if you still need help.

-------
"The most abundant element in the universe is
hydrogen, then second is stupidity."-Harlan Ellison
"What good fortune for our governments that the
people do not think."-Hitler

11:45 am on Oct. 14, 2005 | Joined: Jan. 2003 | Days Active: 1,260
Join to learn more about squirellplayingtag Maryland, United States | Straight Male | Posts: 6,458 | Points: 27,128
Duekiller

Dairy Product Addict
Reply
just do:

""+array1[index]

The "" should convert it to string.

-------
Some days I am the dog, Some days I am the hydrant. In either case the sun shines in my face.


11:08 pm on Oct. 15, 2005 | Joined: May 2004 | Days Active: 421
Join to learn more about Duekiller Ohio, United States | Metrosexual Male | Posts: 936 | Points: 5,166
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic