This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Help with Slide Show Assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help with Slide Show Assignment" Watch "Help with Slide Show Assignment" New topic

Help with Slide Show Assignment

Austin Trower

Joined: Nov 06, 2012
Posts: 19
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

Joined: Jun 09, 2003
Posts: 4632
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

Joined: Nov 06, 2012
Posts: 19
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)
I agree. Here's the link:
subject: Help with Slide Show Assignment
It's not a secret anymore!