• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with accessing another class's image array  RSS feed

 
nurichan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
stituation: i have 2 classes, A and B. i need to use B's image array in A so i created a B object, obj.

using obj.imageArray[j][k] in my A class but when i make, i get this error msg: imageArray has private access in B class.

my image array's is public static n i'm calling it from a public void method in A class.

anyone can help me with this problem? thanks all in advance! ^_^
 
John Dell'Oso
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peg,

Could you please post your code? Also don't forget to use the UBB code tag so that your code is displayed formatted - makes life easier for everyone.

Regards,
JD
 
nurichan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the bold part's the access error... this is from my gui class



then for the class containing the image array

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!