Search:

Type: Posts; User: CameronFaust

Search: Search took 1.58 seconds.

  1. Re: Double always == 0! And a Javadoc issue! (Using NetBeans)

    DOH! That would make sense!

    Actually: I fixed the problem by casting it before i set the variable so:

    double headsPercentage = 100 * ((double)totalNumberOfHeads / totalNumberOfTosses);
    double...
  2. Double always == 0! And a Javadoc issue! (Using NetBeans)

    I cannot for the life of me figure out why headsPercentage and tailsPercentage always = 0! I've debugged step by step and totalNumberOfHead, totalNumberOfTails, and totalNumberOfTosses are never 0....
  3. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Alright I'll repost in a more suitable board. Thanks for all of the help.
  4. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Where I have specified with the points in the boxes[] array that I generated.
    Would it be easier to do all of this in a separate class or in the main class?
  5. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    I moved everything to the main class and still nothing.



    import java.awt.*;
    import javax.swing.*;

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the...
  6. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Alright I'll put it all in the main class. Ill let you know how it goes.
    And thanks for all the help so far.
  7. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Yes this does make a second Form show but this isnt what I'm trying to do, nor do the labels show on the new form.
    I want to make the labels appear on the first and only form.
  8. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    The second JPanel is there you cannot see it because there is no border turned on.

    I got rid of the second Panel and am trying to add the JLabels that are created in my second class to the main...
  9. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    I'm using the JLabels with no image or text to create a 2x38 pixel black line.


    horizontalLines[X].setBackground(new java.awt.Color(0, 0, 0));
    ...
  10. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    I want it to create the labels which are used to make up the boxes. Like my white board image in my first post.
  11. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Sorry, what I meant to say was when I click the button nothing happens.
    I did debug step by step:


    for (int X = 1; X < 272; X++) {

    //Define horizontal line X

    ...
  12. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    So I fixed the nullPointerException, it had to do with some of the arrays.

    Everything runs fine now. I can activate the method and everything goes through. Ive debugged it step by step but nothing...
  13. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Ok so no more stack overflow due to me calling the createBoxes method via a button click. But now I have a null pointer exception.



    /*
    * To change this template, choose Tools | Templates
    *...
  14. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    I know what it is doing now I just need to find out why. It keeps looping those two lines.
  15. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */

    /*
    * jFramePlayArea.java
    *
    * Created on Aug 7, 2011, 5:07:11 PM
    */
  16. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Ran into something else. One moment.
  17. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Now how would I add horizontalLine[X] to jFramePlayArea?
  18. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Wow! I carelessly overlooked those lines when I changed these two lines:



    horizontalLines = new JLabel[272];
    verticalLines = new JLabel[272];


    I originally had them all...
  19. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    init:
    deps-clean:
    Created dir: H:\Java\JustBoxes\build
    Updating property file: H:\Java\JustBoxes\build\built-clean.properties
    Deleting directory H:\Java\JustBoxes\build
    clean:
    init:
    deps-jar:...
  20. [SOLVED] Re: Accessing && Editing properties of objects in an array. Plus a few more questions

    Same deal with the following line.
    679
  21. [SOLVED] Accessing && Editing properties of objects in an array. Plus a few more questions.

    Hello I'm Cameron and I am brand new to this forum and fairly new to Java.

    I got bored and decided to make a little game for both entertainment and learning purposes. I find just diving in and...
Results 1 to 21 of 21