[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Why wont this shitty code work?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 2

File: Capture.png (57KB, 1411x620px) Image search: [Google]
Capture.png
57KB, 1411x620px
Why wont this shitty code work?
>>
>>56009314
Every other time i run the code it throws a "Exception in thread "AWT-EventQueue-0" java.util.ConcurrentModificationException" and sometimes it just werks without any errors
>>
Sent you the fix in private message
>>
nvm I fixed it
>>
>>56009314
>posts only parts of shitty code
Uhh, tileList is never defined?
>>
>>56009314(You)
>>56009340(You)
>>56009351(You)
>>56009364(You)

lol upvoted
>>
>>56009314
>using an bunch of libraries nobody knows
>only posts part of code
Nobody will provide and annswer. Look elsewhere.
>>
>>56009386
It's standard Java Graphics2D by the looks of it.

Try replacing your for-in loop with a standard loop. Usually you get that sort error when your iterating through a collection and removing a member. I can't see that happening, but it might be worth looking at.
>>
>>56009314
Post the whole code
>>
File: Capture2.png (59KB, 1394x584px) Image search: [Google]
Capture2.png
59KB, 1394x584px
>>56009439
Really nothing else to see, just some boiler plate code
>>
>>56009420
Do this please OP, and tell me the results.
Replace, in the draw() call:
for(int i = 0; i < tileList.length; i++) {
tileList.get(i).draw(g);
}

I'm probably wrong, but mayb, if the draw() is called in a different thread - since it's event based - and you're editing the tileList at the same time, that for in will fug you up
Thread posts: 11
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.