The solution is pretty simple. You declare, "I use absolute layout for my program and I set frame bounds(100, 100, 450, 300)."Do not do this. Use layout managers to help you position your components.
, BorderLayout JPanel JButton new GridLayout(0, 1, 0, 5), JPanel (1 , , 5 ), JPanel main BorderLayout.LINE_END , , , . , setBounds(...) , , , , , .