I've been at this one for a bit now. I've got a null pointer exception so I'm guessing somethings not been initialized.
AdminMessages.inbox1.setText(messageRsetArray[0]);
That's my code where it's targetting. But I can't find what's inside. It hasn't been initialized.
AdminMessages
is a class which contains a JTextField
called inbox1
, messageRsetArray
is an array which has taken variables from an array.
Also inbox1
is static. I couldn't get the getters and setter to work. I know it's bad practice though.
Exception in thread "main" java.lang.NullPointerException
at project.AdminMessages.fillInboxGui(AdminMessages.java:587)
at project.AdminMessages.<init>(AdminMessages.java:156)
at project.AdminUser.createAdminMessages(AdminUser.java:31)
at project.AdminUser.<init>(AdminUser.java:17)
at project.AdminUser.main(AdminUser.java:45)