After doing some research, I see that many people have overcome this problem by creating a seperate folder which they call something like "res" or "resources", make it a sourcefolder, and create...
Type: Posts; User: EatMyBible
After doing some research, I see that many people have overcome this problem by creating a seperate folder which they call something like "res" or "resources", make it a sourcefolder, and create...
Alright, so here is what I've changed:
InputStream lydklipp =
this.getClass().getClassLoader().getResourceAsStream("pessent.wav");
AudioInputStream audioIn =...
Thank you! Would you care to be more specific, though? Am I simply supposed to use a URL-request instead? I am new to mixing sound and images with GUI's, so I'd appreciate a step by step guide as to...
I have created a simple GUI that loops a .wav-file when a button is clicked. This works perfectly when run in Eclipse. However, when compiling it in a runnable .jar, it does not run. No errors...
I can finally report that I got it right. While working on a different problem, I saw how easy it was to scan through a sorted array. I did a bunch of stupid things with that code, using the...
Thanks for the help, I got the big mistake fixed. I still don't get why all of the numbers are set to 0, though. Wouldn't the actions done by this code:
for (int j = 0;j<9801;j++){
for...
As a beginner to Java, I can recommend this: Java Actually: A First Course in Programming - Khalid Azim Mughal, Torill Hamre, Rolf W. Rasmussen - Google Bøker
I don't know if its easy to get the...
Excellent question, I will check that...
when running:
for (int z = 0;z<9801;z++){
if (tabell[z].equals("0"));
teller++;
}
Alright, I am currently working on Euler Problem 29. The problem may be found in its full length here:
Problem 29 - Project Euler
This is the code I was confident would solve the problem:
...
Once again, you guys helped me and I learned something in the process. That loop would've run countless times, thus it froze the program. Using a loop in that case was meaningless from the beginning,...
The variable forsok is an integer, which is currently equal to 0. The while loop adds one to forsok as long as tall2 is not equal to svar.
Hello. Since the last thread I started in this subforum, I have gained some experience using WindowBuilder. I am preparing for an upcoming test at school (last year of high-school), and as I loathe...
I don't follow. How do I convert from Text to String, as Text is a new class? How do I make the program understand that it's not going to handle the textfield itself, but the string inside it?
Please move the thread if there is a forum that is better suited.
I have a basic understanding of Java. However, GUI's are far out of my reportoire. I have a GUI with three textfields and a...
Shouldn't minstetall be the lowest number here? It only prints 0.
import java.util.*;
public class Kap3Oppg5 {
public static void main(String[] args) {
int x = 0;
int tabell[] = new...
This is how I ended up solving the problem:
import java.util.*;
public class Kap3Oppg1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int ganger[] =...
Thanks to your post, I now see the logical flaw in my program. It currently looks like this:
import java.util.*;
public class Kap3Oppg1 {
public static void main(String[] args) {
Scanner...
I changed it from i<input.length to i<ganger.length. I do not get an error anymore. This is how it runs, regardless of which number I enter:
Tast inn neste tall:
3
Tallet 0 forekom [I@e5b723...
Hello. I am currently a high-school student. As I am going to apply for Computer Science at my local university after the summer, I have bought the book used in the beginners class for programming....
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Locale cannot be resolved to a variable
import java.util.Scanner;
public class Andregradsformel {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Double a;
Double b;
Double c;...