Problem with class
in
Programming Questions
•
1 year ago
Hello,
I have a problem with a class in processing. Here is my code:
And my Error is: NullPointerException. Why?
I have a problem with a class in processing. Here is my code:
- Buttons[] Button = new Buttons[1];
- public class Buttons {
- public int x;
- }
- void setup(){
- size(480, 800);
- orientation(PORTRAIT);
- }
- void draw(){
- Button[0].x = 10;
- fill(0);
- text(Button[0].x,10,10);
- }
And my Error is: NullPointerException. Why?
1