How to place JLabel on top right corner just below the title bar?

前端 未结 4 864
孤城傲影
孤城傲影 2021-01-27 12:52

Hello I read about Layouts but didn\'t get which one to use for my application. I want to add image to JPanel and place JLabel on op right corner just below the title bar.

4条回答
  •  日久生厌
    2021-01-27 13:35

    Make sure you have

    panel.setLayout(null);
    

    if you wish to position the components yourself.

    But identifying and using a layout manager that would fit your needs would make things easier as the complexity of your application grows.

提交回复
热议问题