In the picture black color is JFrame
, cyan color is JPanel
.
At first, I set JFrame
size (500,500), and a JPanel
whose width is the same as the JFrame
width but whose height is 10 and it works well. When I increased the JFrame
size as like monitor size, I want to increase JPanel
size automatically, however JPanel
width was not increased. What should I do? Or should I make JFrame.setResizable(false)
?