How to adjust the position of a JButton if the JFrame matrix is ​​resized?

I have JButtonin JFrame. Layout JFrameis null. I gave the absolute position to the button. But when I minimize or maximize the frame, the position of the buttons becomes broken, how can I dynamically set it relative to JFrame?

+3
source share
3 answers

Write your own layout . Otherwise, you will do the same, just with a mess listener .

+1
source

Use the layout manager. This is the problem with which they are intended for automatic processing.

, - . , , , . AbsoluteLayout, , Netbeans. , .

+1

Source: https://habr.com/ru/post/1730536/


All Articles