+ 2
So you want to add button right...?
19th Dec 2022, 6:07 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 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
19th Dec 2022, 6:11 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 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
19th Dec 2022, 6:15 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
It will work but you need to configure awt library
19th Dec 2022, 6:20 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Once search on YouTube how to use awt it's depreciated you have use javafx too
19th Dec 2022, 6:21 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 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
19th Dec 2022, 6:23 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Take a look you will get some idea what you need http://kennethalambert.com/BreezySwing/mouseevents.html
19th Dec 2022, 6:29 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
20th Dec 2022, 5:53 AM
Bob_Li
Bob_Li - avatar
+ 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
21st Dec 2022, 7:40 AM
Bob_Li
Bob_Li - avatar
0
What kind of GUI library u using
19th Dec 2022, 6:04 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
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
19th Dec 2022, 6:45 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Wow! Sololearn never taught me these things. Any solution or tutorial for me I also want to know how to.
20th Dec 2022, 3:56 PM
Rapheal Oluwabukola Rotimi (PRO)
Rapheal Oluwabukola Rotimi (PRO) - avatar