I have a JFrame containing three JPanel. The first JPanel contains a JTextField and a JButton. Once the JButton pressed, a JLabel at the second JPanel can show the text input from the JTextField. And then, the third JPanel will change its background according to the JLabel at the second JPanel.
My question is:
How to access the content of JTextField at the first JPanel and then transfer it to the other two JPanel?
you can create
Constructor
Control
please carrefully read all comments by
@Hovercraft Full Of Eelsto both options