Тёмный

Loading All the Image Files in a Folder - Java Extra 43 

RyiSnow
Подписаться 29 тыс.
Просмотров 6 тыс.
50% 1

In this video, I will explain how to load multiple images in a folder.
This is useful when you have a lot of images/files in your res folder or other folders in your computer.
Thanks for watching.
Java Extra Playlist:
• Java Extra
#javatutorial #readImages #BufferedImage

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@とうろう-y3i
@とうろう-y3i 3 года назад
なるほど。ファイルごと読み込んでその中身を配列の中に一つずつ入れていくんですね。役に立ちました。ありがとうございます
@RyiSnow
@RyiSnow 3 года назад
そうですね。お役に立てならよかったです!
@ninjaxhayabusa
@ninjaxhayabusa 3 года назад
You should do a tutorial on JFrame and such for making games. Your explanations are awesome.
@RyiSnow
@RyiSnow 3 года назад
I made a text-based adventure game tutorial long time ago and explained stuff like JFrame in the video!
@saschapolaschek2715
@saschapolaschek2715 3 года назад
Good explanation
@gosho09
@gosho09 2 года назад
i used the same logic on a project of mine and it works fine on windows but on linux i get Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot read the array length because "allFiles" is null any idea how to fix the issue?
@mrED123
@mrED123 Год назад
Very cool, now how would I do it in JavaScript haha
@streetfashiontv9149
@streetfashiontv9149 3 года назад
does this work if you are calling a deck of cards from a folder? If so, would you use the Random object with the label to call a random card from the deck?
@RyiSnow
@RyiSnow 3 года назад
It depends on the program but you don't really need to pick a random label or object. Just pick a random number and use it as the index for the buffered image array. Then place the image wherever you want on the screen. I made the label array just to show all the images on the screen so it doesn't necessarily mean objects and images must be "paired".
@hikari1690
@hikari1690 3 года назад
Why JLabel label[ ] and not JLabel[ ] label?
@RyiSnow
@RyiSnow 3 года назад
They mean the same and either way works!
@hikari1690
@hikari1690 3 года назад
Thank you!
Далее
Adding a Background Image to JTextArea - Java Extra 44
10:18
Map and HashMap in Java - Full Tutorial
10:10
Просмотров 583 тыс.
КТО БОИТСЯ КЛОУНОВ?? #shorts
00:20
Просмотров 561 тыс.
小丑调戏黑天使的后果#short #angel #clown
00:16
A YouTuber is Copying My Tutorial
14:45
Просмотров 33 тыс.
Java multithreading 🧶
15:18
Просмотров 129 тыс.
Java: Read a CSV File into an Array #49
13:47
Просмотров 202 тыс.
WHY IS THE HEAP SO SLOW?
17:53
Просмотров 244 тыс.
Java read CSV File 📰
9:12
Просмотров 95 тыс.
КТО БОИТСЯ КЛОУНОВ?? #shorts
00:20
Просмотров 561 тыс.