natecat's Profile User Rating: *****

Reputation: 56 Whiz
Group:
Active Members
Active Posts:
231 (0.19 per day)
Joined:
19-December 11
Profile Views:
14,564
Last Active:
User is offline Jan 19 2015 03:27 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0
Icon   natecat is so awesome, he can't even think of a status that reflects his awesomeness

Posts I've Made

  1. In Topic: Java got problems with my win message

    Posted 12 Jan 2015

    First of all, stop c/ping code, especially when you don't know what it does. Second, can you go in your IDE and find a button that says something like autoindent and run that on your code and then post it here. Third, all you have to do is store an array with the winning state in it, and then use
    Arrays.equals(ar1,ar2)
    
    to test if the current state is equal to the winning state.
  2. In Topic: Null Pointer Exception Need Help(Arrays?)

    Posted 11 Jan 2015

    Can you post your updated code and errors?
  3. In Topic: how can i make a game using images (like logo quiz)?

    Posted 11 Jan 2015

    Your looking for a CardLayout
  4. In Topic: Help creating a button counter

    Posted 11 Jan 2015

    In java, variables have something called scopes. These help protect programs from malicious code, and help the garbage collector by telling it what isn't being used anymore. You are declaring variables inside a function, and when variables are declared inside a function, their scope restricts them to only being able to be used in that function. Putting the declarations of the 2 variables you need to use outside of that function will fix your problem. E.G. put
    protected static int x;
    
    and
    protected static JTextField Counter;
    
    before your main function and then remove the types from lines 10 and 16 since the compiler can infer them.
  5. In Topic: Null Pointer Exception Need Help(Arrays?)

    Posted 11 Jan 2015

    In sortArray, one of the books in the input data is null, so when you try to call .getTitle() on it, it throws a NullPointerException. Find where a null is getting into that input set and you will fix your problem.
    EDIT: Found the specific problem. You made an array of size 20, and then filled it with 5 elements. You can either replace your array with an ArrayList, or check to see if the book is null before adding it to titles and then rewrite the rest of the method to accommodate for that.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Seattle, WA
Interests:
Gaming, Coding, Biking, and sleeping.
Full Name:
Nathan Wright
Years Programming:
3
Programming Languages:
Java, Python

Contact Information

E-mail:
Private

Friends

Comments

natecat has no profile comments yet. Why not say hello?