my dog learned polymorphism*
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 Android Security Essentials Live Lessons 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)
Don't get me started about those stupid light bulbs.
subject: Help with Slide Show Assignment
Similar Threads
Small event handling problem, need to implement a stop
problem with paint methods
To make moving ball
Some help needed to find an event stopping condition
Animation in Swing