I need to make my JPanel resize dynamically as new components are being added to it

前端 未结 2 1903
梦如初夏
梦如初夏 2021-01-15 19:51

I need to let users add more text fields to my JFrame so once the size of the frame has exceeded its original value a scroll pane would step in. Since I cannot add JScrollPa

2条回答
  •  醉话见心
    2021-01-15 20:44

    Choose the Miglayout option under Layouts. i found this to be the easiest way

    https://i.stack.imgur.com/XKHVu.png

提交回复
热议问题