Java - JPanel with margins and JTextArea inside

后端 未结 1 1371
温柔的废话
温柔的废话 2021-02-19 14:07

I want to create something like this:

\"Centered

Main panel has its margins (x), and TextArea i

1条回答
  •  醉酒成梦
    2021-02-19 14:39

    there are two ways

    • use propers Borders, in this case EmptyBorders

    • use proper LayoutManager, BorderLayout(int horizontalGap, int verticalGap), GridLayout(int rows, int cols, int hgap, int vgap),

    easiest way would be use EmptyBorders

    0 讨论(0)
提交回复
热议问题