I'm trying to declare an Image object, but I get a NullPointerException every time I try to use it. This is my constructor:
final Image systemSecureImage = new Image((getClass().getResource("images/notifications/systemSecure.png")).toString());
When I try to use it in a method, it throws the error. For example...
sample.sampleMethod(image);
Any idea what I'm doing wrong? I've also tried it two other ways:
Image systemSecureImage = new Image("images/notifications/systemSecure.png");
Image systemSecureImage = new Image("file://images/notifications/systemSecure.png");