Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with Slide Show Assignment

 
Austin Trower
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote this program that is supposed to run and show 25 pictures then recycle after all the pictures have been shown.

I dont have any errors in my code or when I run it but I just get a greyed out window that pops up with no pictures. So is my error in my file path or in my code have a look.

 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
works OK for me.
are you sure the file structures are correct?
i.e. the first one to display "C:/temp/stuff" +y+ ".jpg" = "C:/temp/stuff0.jpg"

also, read in each image file in the constructor, or separate method, just *never* in paintComponent()
 
Austin Trower
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael I was thinking that same thing and , after reading a bit I figured it out



i just needed to put the ./slide in there cause the slides were all slide0, slide1 (etc)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic