Jump to content

java help needed

RNGesusHatesMe
Go to solution Solved by Nuluvius,
9 minutes ago, RNGesusHatesMe said:

@Nuluvius not sure how but isnt it fine using paste bin (it keeps its formating)

I just can't really be bothered to go chasing links... fine whatever.

 

The most glaringly obvious candidate is this particular line (#23):

this.Note = Note;

What are you hoping to accomplish with that? You are assigning the instance to itself and it has not been instantiated thus it will have a default value of null. You later operate upon this uninitialized variable in your actionPerformed method:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at RightClickMenu.actionPerformed(RightClickMenu.java:81)

Which the first two lines of your stack trace is telling you...

hey guys been doing htis mini assignment for a week and ive done aside this one error im getting 

can i get help from a java wizz ? (sorry java aint my forte) would really appreciate it.

 

just for clarification im asking to help me find the issue not do the assignment for me (i wont learn if some else does it for me )

Link to comment
Share on other sites

Link to post
Share on other sites

oh sorry ment to say pm me if you can help :)

 

@fizzlesticks sorry rather not just publicly upload it for everyone just people that can help :)

Link to comment
Share on other sites

Link to post
Share on other sites

58 minutes ago, RNGesusHatesMe said:

@fizzlesticks sorry rather not just publicly upload it for everyone just people that can help :)

Can't you create an generic example of the problem that you are having?

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

its easier just to pm the person my file with the error i know its a nullpointer the issue is i have 0 idea where it is 

 

EDIT just remembered about paste Bin

 

http://pastebin.com/wB3Kte2F

 

http://pastebin.com/nBdUjSY6

 

im pretty sure its the first class causing issues ive looked at it all day today and yesterday and still no closer to figuring it out. im about to rewrite it to find it but still

 

http://pastebin.com/n9Jm2DRp

heres the error 

 

@Nuluvius

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, RNGesusHatesMe said:

its easier just to pm the person my file with the error i know its a nullpointer the issue is i have 0 idea where it is 

 

EDIT just remembered about paste Bin

 

http://pastebin.com/wB3Kte2F

 

http://pastebin.com/nBdUjSY6

 

im pretty sure its the first class causing issues ive looked at it all day today and yesterday and still no closer to figuring it out. im about to rewrite it to find it but still

 

http://pastebin.com/n9Jm2DRp

heres the error 

 

@Nuluvius

 

Put your code in code tags here?

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, RNGesusHatesMe said:

@Nuluvius not sure how but isnt it fine using paste bin (it keeps its formating)

I just can't really be bothered to go chasing links... fine whatever.

 

The most glaringly obvious candidate is this particular line (#23):

this.Note = Note;

What are you hoping to accomplish with that? You are assigning the instance to itself and it has not been instantiated thus it will have a default value of null. You later operate upon this uninitialized variable in your actionPerformed method:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at RightClickMenu.actionPerformed(RightClickMenu.java:81)

Which the first two lines of your stack trace is telling you...

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

i cant believe i missed that thanks so much @Nuluvius soz for late reply my internet went down. just gotta get my copy and cut functions to work for some reason the 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×