Search:

Type: Posts; User: scooty199

Search: Search took 0.19 seconds.

  1. Replies
    15
    Views
    2,107

    Re: Problem with NullPointerException?

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

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

    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,107

    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,107

    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,107

    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,107

    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"))...
  7. Replies
    13
    Views
    3,016

    Re: JFrames not coming up?

    I've gotten the JFrames fixed. I entirely eliminated the use of the JFrame array.
  8. Replies
    13
    Views
    3,016

    Re: JFrames not coming up?

    I know I initialized sg. I always hit the construct button before I hit any of the action buttons.

    When I hit my Action 1 button, it gives me a NPE for scores.
    I know scores is set to null, but ...
  9. Replies
    13
    Views
    3,016

    Re: JFrames not coming up?

    Any help at all?
  10. Replies
    13
    Views
    3,016

    Re: JFrames not coming up?

    Alright I got it displaying, now I'm getting a NullPointException at


    scores = sg.getTestGrades();
  11. Replies
    13
    Views
    3,016

    Re: JFrames not coming up?

    I noticed that, and it was fixed. oddly it didn't throw a nullpointer exception.

    And I'll try that e.getActionCommand()
  12. Replies
    13
    Views
    3,016

    Re: JFrames not coming up?

    I added that for all my JFrames, included the inherited one.

    It seems it just sits there when I run, nothing comes up.
  13. Replies
    13
    Views
    3,016

    JFrames not coming up?

    Ok, so I've had my three classes, and nothing seems to be running for me. It compiles well, just my swing components don't appear.

    Here's the code:
    GUI Class

    import java.awt.*;
    import...
  14. [SOLVED] Re: Experiencing a run time error, don't know what the problem is

    I did find my error. I realized in my keyPressed method I should have out the parseInt under the if condition.

    Thanks for the help!
  15. [SOLVED] Experiencing a run time error, don't know what the problem is

    Ok, so in my GUI application, it takes a string and converts it to a number, but there's a problem.

    It generates a run time error

    Here's the cod]
    import java.awt.*;
    import java.awt.event.*;...
Results 1 to 15 of 15