Search:

Type: Posts; User: EatMyBible

Search: Search took 0.40 seconds.

  1. Re: Compiled .jar won't run when using .wav-files.

    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...
  2. Re: Compiled .jar won't run when using .wav-files.

    Alright, so here is what I've changed:



    InputStream lydklipp =
    this.getClass().getClassLoader().getResourceAsStream("pessent.wav");
    AudioInputStream audioIn =...
  3. Re: Compiled .jar won't run when using .wav-files.

    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...
  4. Compiled .jar won't run when using .wav-files.

    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...
  5. Re: Arrays, BigInteger's and a bunch of for-loops. Welcome to a huge mess! [Do not view if you do not want any hints on Project Euler]

    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...
  6. Re: Arrays, BigInteger's and a bunch of for-loops. Welcome to a huge mess! [Do not view if you do not want any hints on Project Euler]

    Only 0's when printing tabell[j]
  7. Re: Arrays, BigInteger's and a bunch of for-loops. Welcome to a huge mess! [Do not view if you do not want any hints on Project Euler]

    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...
  8. Replies
    12
    Views
    13,375

    Re: Good Java book for beginner?

    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...
  9. Re: Arrays, BigInteger's and a bunch of for-loops. Welcome to a huge mess! [Do not view if you do not want any hints on Project Euler]

    Excellent question, I will check that...

    when running:



    for (int z = 0;z<9801;z++){
    if (tabell[z].equals("0"));
    teller++;
    }
  10. Arrays, BigInteger's and a bunch of for-loops. Welcome to a huge mess! [Do not view if you do not want any hints on Project Euler]

    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:


    ...
  11. Re: Using while-loops in Actionlisteners - WindowBuilder

    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,...
  12. Re: Using while-loops in Actionlisteners - WindowBuilder

    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.
  13. Using while-loops in Actionlisteners - WindowBuilder

    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...
  14. Replies
    3
    Views
    1,593

    Re: WindowBuilder - beginner problem.

    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?
  15. Replies
    3
    Views
    1,593

    WindowBuilder - beginner problem.

    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...
  16. Replies
    0
    Views
    1,106

    Finding the lowest number in an array.

    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...
  17. Replies
    6
    Views
    1,357

    Re: Saving information from arrays. I think.

    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[] =...
  18. Replies
    6
    Views
    1,357

    Re: Saving information from arrays. I think.

    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...
  19. Replies
    6
    Views
    1,357

    Re: Saving information from arrays. I think.

    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...
  20. Replies
    6
    Views
    1,357

    Saving information from arrays. I think.

    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....
  21. Re: A couple of issues with my quadratic equation solver.

    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    Locale cannot be resolved to a variable
  22. A couple of issues with my quadratic equation solver.

    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;...
Results 1 to 22 of 22