Ryan Smith

Ranch Hand
+ Follow
since Jun 29, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ryan Smith

What do you mean? Yes the iPod is worth $250 and I am paying $5 for each person who signs up. However, if you wanted the iPod, you would have to sign up on the site anyways (and then do the same thing I am). So it's a win-win deal...because even if you don't want to sign up, it takes all of 5 minutes to do. A buck a minute...that's not bad by my standards.
19 years ago
freeiPods.com is giving away free iPods. This is not a scam. (See http://portableaudio.engadget.com/entry/1771223899144212/ for proof of its legitimacy.)

In any case, I need 5 people to sign up using the below referral link and then sign up for one of the offers on the site. All of these offers require a credit card; they are the type of deals where you sign up and then you just have to remember to cancel the free trial before the end of the expiration period - that is the only annoyance.

Personally, I would suggest signing up for the AOL offer because it is the most reputable and known for good customer service, so cancelling won't be a hassle. Additionally, I am personally intrigued by their music service. But sign up for whatever you want using my referral link and I will send you $5 in Paypal (or any other method). It should take only about 10 minutes. One suggestion - when you sign up, make sure you uncheck the boxes that have something to the effect "Sign up for promotions by our sponsors" - that is, unless you enjoy spam!

Any questions? Send me a PM or email me at dav8571@hotmail.com

Referral link:

http://www.freeiPods.com/default.aspx?referer=8174574
19 years ago
Ok, scratch that one too. That one finds an incorrect prime, due to the uncertainty of approximations that end in "9." Re-thinking...
19 years ago
Haha I skipped some didn't I! Sorry that's what I meant
19 years ago
1, 2, 3, 5, 13, 31, 74....ad infinitum
19 years ago
Wait I take it back - that isn't quite right. Doubles are not going to cut it - must adjust with BigDecimal.
19 years ago

[ August 21, 2004: Message edited by: Ryan Smith ]
19 years ago
Do you want something like this?

19 years ago
There is fundamentally no difference if you un-comment //throw new SimpleException(); All you do is force it through the if statement, upon which it will throw the same exact exception.

I just compiled your code fine. If you are having problems, check the file name - be sure that it is saved under SimpleExceptionDemo.java, which is the main class.
19 years ago
Here is the part of your code that I'm having trouble with:



The first statement in your try block will always execute; I'm not sure what you're trying to accomplish by putting that there. The second System.err.println statement will never execute because f will always throw an exception...Your catch block is always catching the exception throw by f(), not the SimpleException thrown at the end of the try block. Hope this clears things up.
[ August 01, 2004: Message edited by: Ryan Smith ]
19 years ago
In reply to your first question: when a method, either explicity -- as yours does -- or potentially, throws an exception, it must be declared as thrown. Otherwise you face a runtime exception if is thrown and the method is not expecting it.
[ August 01, 2004: Message edited by: Ryan Smith ]
19 years ago
Why don't you try putting them in the same folder...see what happens, do a little experimenting...
19 years ago
Do you have any MouseListener interfaces implemented in your cells?
19 years ago
Your best bet would be a JTextArea (http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextArea.html), which you can set scrollable in either vertical or horizontal and (non)-editable.
19 years ago
Oh, I just re-read your post, and all you need is lines connecting the points! Ignore the above post in that case!

What I would do is use Graphics's drawLine method, implemented in a for loop.

For example:

[ July 31, 2004: Message edited by: Ryan Smith ]
19 years ago