0

I started a project and need help please in Java

What I need to do is Firstly have a directory with a bunch of jpg pics in it ready.   Now the program is to do the following. Open the directory and displays on the screen the first jpg pics in the directory. It waits a few seconds then calls up the second jpg pic and displays that and so on. https://code.sololearn.com/c7k9157EdDP4/?ref=app

16th Dec 2019, 9:40 PM
d- unit
d- unit - avatar
6 Answers
+ 1
You can use "Thread.sleep(100);" For waiting 0.1 sec before the next element is displayed.
17th Dec 2019, 12:59 AM
Avinesh
Avinesh - avatar
+ 1
public static void main(String[] args)throws InterruptedException { String[ ] myNames = { "A", "B", "C", "D"}; String[ ] myfirstarray = {"my", "first", "array" ,"got","it", "working"}; System.out.println(myfirstarray[0]); Thread.sleep(1000); System.out.println(myfirstarray[1]); Thread.sleep(1000); System.out.println(myfirstarray[2]); Thread.sleep(1000); Etc etc
17th Dec 2019, 1:41 AM
HNNX 🐿
HNNX 🐿 - avatar
0
Thanks I will try it
18th Dec 2019, 9:31 AM
d- unit
d- unit - avatar
0
Avineh I got it working just need to know how to import the images to be displayed on screen.
19th Dec 2019, 7:44 PM
d- unit
d- unit - avatar
19th Dec 2019, 7:46 PM
Avinesh
Avinesh - avatar
0
Works but not on Intellij
22nd Dec 2019, 1:31 PM
d- unit
d- unit - avatar