Get ready:
Absolute layout absolute layouts, where controls can be placed anywhere in an absolute layout
How do I make a pop-up box like the one below?
--------------------------------------------
Create a new pop-up box, then select Getcontentpane (), and then set the shrimp's layout property to Absolute layout.
Then drag JButton from the left to the pop-up box on the right, and you'll find that JButton can be placed anywhere you want.
Homework:
1. Make one of the following pop-up boxes
The upper-left and lower-right corners are a jtextarea, respectively, A and B, the middle is a JButton
Requirements:
1. After entering the text in B, click on the button text to appear in a, and also in the console output B text, and finally empty the input in B
2. When there is too much content in a or B, you can scroll to see what is not displayed
How does Java swing place a button anywhere in the popup box? (Use of Absolute layout layouts)