Positioning a JPanel in a JFrame at specific position

后端 未结 3 983
难免孤独
难免孤独 2021-01-14 03:48

I need an help for positioning a JPanel in a specific position into a Jframe.

I have a JPanel in a class who extends JFrame, and I need to put this JPanel in a speci

3条回答
  •  广开言路
    2021-01-14 04:44

    Of the frame's content panel, the layout manager by default is a BorderLayout (NWSE+C). Do:

    this.getContentPanel().setLayout(null);
    

提交回复
热议问题