+ 5
An idea: use the frameCount environment variable in a condition inside the draw method, to decide if you want to execute a particular code inside the frame or not. https://processing.org/reference/frameCount.html
24th Dec 2022, 6:57 PM
Tibor Santa
Tibor Santa - avatar
+ 2
I dont know about the functions draw(), noLoop() and Loop() but in a loop if it is a for, while or do while loop you can use CONTINUE to skip a iteration just make sure you use a if statement so the continue doesnt happened every single time.
23rd Dec 2022, 7:07 PM
Vanessa Nilsson
+ 2
belal bayrakdar A bit rude but do you mean JFRAME draw method or?
23rd Dec 2022, 9:03 PM
Vanessa Nilsson
+ 2
belal bayrakdar My question is why would you want to skip it at all? Think of draw as the event-loop in a gui program. You run it continuously to display and receive input. There is no incentive to skip it. You can probably create objects that have a skip property, though. Also, maybe you shouldn't snap at Isak Nilsson . It was a general answer that is correct. We should be grateful to have people respond to our questions.💓 Anyway, it is hard to give an answer without your code or a more detailed description of your problem. maybe something like: https://discourse.processing.org/t/how-to-delay-part-of-the-code-in-draw/24872
25th Dec 2022, 5:59 AM
Bob_Li
Bob_Li - avatar
+ 2
That's how processing handle things. You could try other java gui solutions. I'm not very familiar with the Java ecosystem, so maybe some other members can give you more useful suggestions. But I suppose most gui program would have a running process on standby to receive user input.
25th Dec 2022, 2:42 PM
Bob_Li
Bob_Li - avatar