Click here to Skip to main content
15,885,546 members

Comments by Catey Category (Top 6 by date)

Catey Category 4-Mar-20 9:54am View    
Yes, that's true. Perhaps I should have left out the code and just give suggestions on how to fix it themselves.
Catey Category 27-Feb-20 4:42am View    
When I duplicate your method of adding an image to a JLabel it works just fine for me. Have you checked whether the path is correct? If I break the path in my code it won't prompt an error. It just wont show an image. Maybe that's what you're experiencing.
Catey Category 21-Oct-19 2:55am View    
It sure isn't Java. It looks a lot like JavaScript, so that's my guess. A quick search lead me to this: https://validatejs.org/docs/validate.html
Catey Category 17-Oct-19 4:15am View    
Unfortunately, I don't have a solution for you, but perhaps I can still help out. What your manager tells you is potentially true. Multithreading a search over a Map<t,k> can be faster as long as there are no thread bottlenecks. Think of key methods that are synchronized for example. They should(if implemented correctly) be thread-safe, but might not make your search faster.

I've had this same issue in a 2D graphics rendering engine where I had threads rendering to the same screen in their own region of the screen. This can result in faster rendering, but the key plotting method was synchronized, so in the end all the threads were waiting for each other to plot. In the end, the thread management overhead cost more time then just single-threading the rasterizer, which was blazing fast already.

Perhaps my anecdote can help you test your solution for performance.
Catey Category 11-Oct-19 2:02am View    
Thanks, good luck with your app. :)