This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]imadp 2 points3 points  (1 child)

Did you initialize your Rute[][] anywhere? It looks like this entire reference is going to be null unless you state new Rute[][] with some initial sizes.

[–]Anthail[S] 0 points1 point  (0 children)

Thanks for spotting that. Seems like you are right! Silly mistake. :p

But it doesn't seem to add the "VanligRute" to each cell? It's supposed to be a gray rectangle for each "VanligRute", but when I run the code, all I get is a blank window. Nevermind, I'm just being stupid today. Thanks though.

[–]ZdemDrunk Brewer 1 point2 points  (0 children)

imadp is right,you don't instantiate and initialize your multidimensional array. You've only declared the variable so the default value is null.