Search:

Type: Posts; User: scooty199

Search: Search took 0.12 seconds.

  1. Replies
    15
    Views
    2,121

    Re: Problem with NullPointerException?

    Ah, I wasn't thinking that. I'll try that. Thanks.

    And thank you javapenguin.
  2. Replies
    15
    Views
    2,121

    Re: Problem with NullPointerException?

    I've also tested the first if statement, if it's true it'll come up with a box saying created. So it does create it.
  3. Replies
    15
    Views
    2,121

    Re: Problem with NullPointerException?

    Because it order for my program requirements to be met, it had to be instantiated at some point, but the program requirements wouldn't have been met if I just had it set as

    StudentGrades sg = null;
  4. Replies
    15
    Views
    2,121

    Re: Problem with NullPointerException?

    Well, I do have it defined.

    Here's the full code


    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
  5. Replies
    15
    Views
    2,121

    Re: Problem with NullPointerException?

    No, I mean area[0]. I specifically have an array of 8 JTextAreas, used in a JLayeredPane.

    Here's the fields in StudentGUI

    private int[] scores;
    private int[] sorted;
    static JButton[]...
  6. Replies
    15
    Views
    2,121

    Problem with NullPointerException?

    Ok, so I'm working with returning an array in my program, StudentGrades

    In this block, once my button construct is hit... it creates the array


    if(e.getActionCommand().equals("Construct"))...
Results 1 to 6 of 6