David G Risner

Ranch Hand
+ Follow
since May 02, 2002
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 David G Risner

Have you tried using IBM's JDK instead of Sun's? I seem to remember some tests from way back that IBM's JDK was better at handling a large amount of threads.
17 years ago
In JCreator, do the following:
Go to Options->JDK Tools
Click on <Default>, then click the edit button.
Check the "Show command line" option.
Now when you run the application, JCreator will show the complete command line it uses. Note that the class name comes at the end of the command line.
I personally like to use getClass().getResourceAsStream("datafile") to get an InputStream that I can then use to read the file.
The data file needs to be found in the same directory as the class file (or within the jar file the class file is from in the same directory within the jar file).
You can put a "/" at the beginning of the data file name if you want to place the data file at the root of the codebase (or the root of the jar file).
17 years ago
I used RefactorIT a lot during its beta period. It does work well -- a bit too pricey for an IDE add-on, but it does its job. I couldn't justify the cost with most IDEs seeming to work on adding these features.
As to what I used mostly:
1. Rename methods, classes, variables, and even packages.
2. Pulling methods up into a base class.
The second one is really helpful. The first one is very convenient.

However if i try and copy the classes to a file on a network and open up the applet on another pc the applet opens up but when i press my calculate button nothing comes up at all. For some reason in the webpage it will not display text for some reason.


I assume that this PC is running IE using MS's Java VM. This VM is only compatible up to 1.1.4. Double.parseDouble was added later than 1.1, I think it was added in 1.2, but it might have been 1.3.
Change your Double.parseDouble() calls to something like Double.valueOf().doubleValue()
You might also need to compile using the "-target 1.1" option in Javac if you are using 1.3 or 1.4.
18 years ago
It is because your class is not an ItemListener. Either your class needs to implement the ItemListener interface or you need to create an inner class that implements ItemListener and have it take care of whatever tasks are needed.
18 years ago
It looks like you are attempting to connect to a different server than the one the applet is served from.
This is not allowed by the applet security model.
18 years ago
I should also say:
then add the servlet.jar file to your classpath when compiling.
18 years ago
Download the API source for Tomcat from here.
It has the servlet.jar for the most current Servlet/JSP spec.
18 years ago
AudioClip is an Interface that various audio classes can implement.
Generally, it would be some piece of sound that can be played.
If you're using 1.3 or later, check out the javax.sound packages for more on audio stuff.
18 years ago
Make your life easy and get the Ostermiller utilities at http://ostermiller.org/utils/.
This includes a class for creating CSV files that are compatible with Excel.
18 years ago
I've been using bugtrack because it was really easy to set up and I understand what all the fields are supposed to mean. :-)
It is at: http://www.agstools.com/products/bt.html
Of course, there is always Bugzilla:
http://www.mozilla.org/projects/bugzilla/
How about using a FocusListener on your Panels?
18 years ago
That looks incredibly inefficient to me. It looks through every point in the rectangle that bounds the arc to see if it is part of the arc.
If the arc is part of a circle (as opposed to an ellipse/oval), then if the center of the circle is at cx, cy, and a radius of r, the points on the arc will be:
x = r * Math.cos(theta) + cx;
y = r * Math.sin(theta) + cy;
Where theta is the angle. You could just do a for loop to go through the values of theta you want.
18 years ago