I'm studying Java Swing, and I created some JFrame
windows, in some of them, I created a button and they have the same solution (like search or save information), however, all the time I've had to create from the begining or use ctrl+c
ctrl+v
. Is there a way to create a JButton
and use the same button in multiple frames?
And for JTextfield
, there's a way to create only once and use for multiples frames?
There's an example using a unique button and showing a "Hello World"?