I have two Java Swing classes. I want to put extra some String
in second Swing GUI on button click. I wrote code to can show second JFrame
, but I don't know how to put some data (name, last name or etc).
This is my button listener code:
DetailsGUI detailsGUI=new DetailsGUI();
detailsGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
detailsGUI.pack();
detailsGUI.setVisible(true);
How can I solve this problem?