+ 2
So you want to add button right...?
+ 1
You can't add button without using any gui library you can use javafx if you wanna create button and all ..
Explain more what actually you want to do
+ 1
No belal bayrakdar these are the parts of GUI library
If u will use simply in your Java program it will treat as a normal function
+ 1
It will work but you need to configure awt library
+ 1
Once search on YouTube how to use awt it's depreciated you have use javafx too
+ 1
You class name button is fine
Constructor is also fine
Your Boolean function is also fine
but You will get errors in fill(200) function..... because you haven't defined it rest of the things are simple as Java program which you write to implement function class and constructor
+ 1
Take a look you will get some idea
what you need
http://kennethalambert.com/BreezySwing/mouseevents.html
+ 1
belal bayrakdar
study this code:
https://processing.org/examples/button.html
+ 1
belal bayrakdar
p5js is the Javascript Processing implementation. It is more portable, imho. Access via cdn is very convenient.
Here is my OOP button in p5js.
I included the Java version in the javascript tab. you can copy paste that to your processing ide.
p5js can access DOM elements, so it is possible to have a better implementation here, but I tried to keep things as similar as possible to the Java version.
https://code.sololearn.com/WpBuD0hWvSvW/?ref=app
0
What kind of GUI library u using
0
I don't have knowledge about the processing... I visited the website you need to read getting started page https://processing.org/tutorials/gettingstarted
0
Wow!
Sololearn never taught me these things.
Any solution or tutorial for me I also want to know how to.