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
6 Answers
+ 1
You can use "Thread.sleep(100);"
For waiting 0.1 sec before the next element is displayed.
+ 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
0
Thanks I will try it
0
Avineh I got it working just need to know how to import the images to be displayed on screen.
0
See if this helps
https://www.geeksforgeeks.org/image-processing-java-set-1-read-write/
0
Works but not on Intellij