Java Course Intern Journal (Wednesday) __java

Source: Internet
Author: User

Because of a long time, want to get the picture from the above path, and then the following is a random display, in the path there for a long time, so until now published.

Get path and random display picture part code

	File F = new file (strpath);  
							string[] names = f.list (new FilenameFilter () {public
								Boolean accept (File F, String name) {return
									Name.endswith (" . jpg ");  

								}    
							);

							Random r = new Random ();  
							String strtmp = strpath+ "/" +names[r.nextint (108)];    
							String strTmp1 =strpath+ "/" +names[r.nextint (108)];    
							String STRTMP2 = strpath+ "/" + names [R.nextint (108)];  

							Lblimg1.seticon (New ImageIcon (strtmp));
							Lblimg2.seticon (New ImageIcon (STRTMP1));
							Lblimg3.seticon (New ImageIcon (STRTMP2));

In doing programming, in some aspects of the knowledge is not good, will have a great impact on the future, this time to realize that they have to learn from the foundation, and then in this road to go farther and better.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.