JButtons in processing

Hello everyone, I am making a simple application that requires a lot of buttons, and I want to be able to use the JButton class in order to do so. However, I don’t know how to do this because traditionally to make a JButton in Java you have to add it to a JFrame. Any ideas on how to implement the JButton class?

is there a reason you can’t add it to a JFrame

Have you tried the processing libraries controlp5 or g4p. They are designed for ui creation. Im working on my own gui lib which you are welcome to make use of just need a couple of days to finish it up. But honestly a tried and tested lib just like the ones above might be a better idea.

that would create a separate window and I don’t want that.