Java GUI Layouts

前端 未结 5 1956
耶瑟儿~
耶瑟儿~ 2021-01-07 02:55

Could somebody tell me which java layout I need to use to achieve the layout below:

\"Correct

5条回答
  •  心在旅途
    2021-01-07 03:11

    Use multiple nested layout managers

    The example looks like a top-level BorderLayout with scroll pane in the CENTER location, a row of buttons (using FlowLayout) in the NORTH location and a GridLayout for the text fields in the WEST location. The latter could be improved by using a GroupLayout, which allows rows and columns to be sized individually but is somewhat complex to use.

    There's a great tutorial on using layout managers (unfortunately it seems to have disappeared from Oracle's servers and the link points to a probably transient copy).

提交回复
热议问题