Charlie Goth

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

Recent posts by Charlie Goth

I've just been read my spec, it states - "[The user interface] must be composed exclusively with components from the Java Foundation Classes (Swing components).

The thing is, I've written a class that extends JFrame (to add additional functionality - namely the ability to dynamically edit the menu). Obviously it uses Swing but does it break the requirement (you do need to import more than javax.swing.* to make it work)?

I suspect I'm being too literal, I assume they meant exclusively Swing as opposed to AWT.

Can anyone confirm this?
Good idea.

I've done a bit of tinkering, and got the client to 'download' the class file in question. However, I can't find any trace of the 'downloaded' file - I even checked for files modified today - it's not there.

Well, I guess that I'll have to think of another way of doing what I had planned...

I'm wanting to download 'installers' from the server and run them on the client, upgrading the client without the user doing anything. I had planned to run each of the installers each time the application runs (essentially the client will do nothing, except exit, until the installers run), so I need the code to persist.

Any ideas?
18 years ago
Nothing, but if I run them both on the same machine, all the classes will already be on the client - so I can't observe the behaviour (no classes will be downloaded etc.)
18 years ago
I wouldn't normally ask something like this but I've only got one machine so I can't get the answer by myself.

OK, so when RMI downloads classes not found on the client:

Where are they downloaded to?

Will the class file persist on the client for the next time?

Is there any built-in version control? i.e. will RMI download an updated version of existing classes.

Thanks in advance
18 years ago
*stands corrected*

I haven't read the whole thread, but are you trying to ensure that the same client calls lock(), update(), unlock()? Is that necessary? Can't just rely on the client having the correct cookie to update and unlock?

Originally posted by Michal Charemza:

Is it ok to design my Data class that assumes that lock(), update(), and unlock() are all called from the same thread? This is to use the Thread.currentThread() to try to adhere to the spec for lock():

I'm no expert but I'm assuming the examiner will run some sort automated program to rigourously test our code. In those circumstances that assumption will be invalid, meaning the examiner will have to use his brain to figure out if your code will work properly. I wouldn't think they'd fail you for it but I'm not sure they'd like you for it either.
Maybe I'm wrong but the message looks different to what I get if I import a non-existant class. Could there be something else wrong with the code?

Normlly (for me atleast) I'd get:
cannot find symbol
symbol : class Fish
location: package javax.swing
import javax.swing.Fish;
...................^ (without the dots)
1 error
18 years ago
No, you can't change the interface.

Yes, you extend from the interface and implement that. Or you could just add methods to the class and not bother with the extra interface.

And gain bonus points by posting the link?
18 years ago

Originally posted by Joseph Clifton:
I'll work on the looup table in a bit.

As for the exceptions thing, I just want to program to quit when the user clicks "cancel", I don't want a message explaining the exception. That's the reason why I did the catch statement.

You might want to wrap the whole code in a infinite loop too, allowing the user to translate again without restarting the program.
19 years ago
Yes I need it, its for calculating the winnings of 'canadian' style bets, that is bets on A, B, C, AB, AC, BC & ABC.
19 years ago
Is there a way of getting all subsets from a Set? I've tried writing it myself but its doing me head in, and making me think I'm not cut out for this programming

Any help would be greatly appreciated.
19 years ago
What do you think it means? As long as you can justify it (in choices.txt) you wont lose marks.