Keith Biddlecomb

Greenhorn
+ Follow
since Jan 25, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Keith Biddlecomb

The only advantage of several smaller JAR files that I can think of is if you are using it as a web application, which you already said you're not, so I agree, there really is no advantage to several smaller files. Just combine it into one larger package.
19 years ago
What do you mean by "combining images" Do you mean posting one on top of the other? If so, then one way to do it is to set the first image as the background of a JPanel, and then put the second as an object in the JPanel.
19 years ago
An alternative way to do it (I do not like using the Applet classes all the time when I'm not dealing with an applet) would be to create an instance of type Clip. Below is an example of how to do this.


I prefer to use this method for playing sounds, because it does not use the Applet class, but I guess in the end it doesnt really matter. Just a note, the line
clip.open(audioInputStream)
doesnt return until the file is read.

Hope that helped.
19 years ago
for (int i = 0; i < 5; i++) {
//your code goes here
}

This loop will repeat itself 5 times. I'm not sure how familiar you are with the i++ syntax, but it is the same as i = i + 1, so if you feel more comfortable writing that in the loop instead, it would also work. Just a word of caution, make sure, in general, you DO NOT redefine i (or whatever variable you choose to use as the counter) inside the loop. That is a very easy way to cause an endless loop.
19 years ago
If she is really interested in programming, she could always look at example files on the internet for simple programs. Thats how I first learned to program. Maybe I'm just weird, but I find that just looking at some simple code posted on the interned (google is your friend) to help understand syntax is the best way for me to learn.
19 years ago