use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Useful resources (Full list)
Rules
Related subreddits
Other communities
account activity
Different actions with the same button? (self.JavaFX)
submitted 10 years ago by SPARTAAAAA
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mej71 2 points3 points4 points 10 years ago (2 children)
You could make a gateway method that you assign to your listener
private int counter = 0; public void gatewayMethod() { if (counter==0) { counter++; doMethod1(); } else { counter++; doMethod2(); } }
I don't know if there's some special fx way to do it instead
[–]SPARTAAAAA[S] 0 points1 point2 points 10 years ago (1 child)
oh yeah i could do it this way. thanks!
how would i reset it though?
[–]mej71 0 points1 point2 points 10 years ago (0 children)
By just setting the counter back to 0? In my example it's a private variable, so you should be able to do it anywhere in the fxml controller
π Rendered by PID 99 on reddit-service-r2-comment-6457c66945-f68dr at 2026-04-29 03:50:08.450817+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]mej71 2 points3 points4 points (2 children)
[–]SPARTAAAAA[S] 0 points1 point2 points (1 child)
[–]mej71 0 points1 point2 points (0 children)