Can someone tell me how to add 3 buttons under the txtArea in the TextLine class present in this link : https://stackoverflow.com/a/18780743/3649438
I am new to GUI programming and I have problems in adding them. I tried to add JButtons to pane1 or contentPane, but it seems that the code automatically resizes the window and it is not possible to add the buttons. I just need to add simple JButton which I will edit with my own code.
My possible solution was the one of making a button (repeating the procedure for each button) in this way:
JButton cancelBtn = new JButton("Cancel");
and then add it to the panels in this way.
cancelBtn.setVisible(true);
contentPane.add(cancelBtn);
but when I run it, it doesn't display it. I tried many other different ways with no success.