What is the correct way to use JPanels in Netbeans?

后端 未结 1 1680
庸人自扰
庸人自扰 2021-01-24 00:50

I\'m new to Java GUI.

First I created a JFrame and have added a JPanel. After that I set it as a Null Layout. Then added a label and set a background image for the fram

相关标签:
1条回答
  • 2021-01-24 00:54

    I want to know whether it's correct or not to add 4 JPanels on a main JPanel?

    Sure. Most of the Java GUIs you see that are any more than trivial put panels inside other panels.

    Sometimes a different panel is used to group common controls or output components and possibly give them a titled border. More commonly different panels are used in order to use different layout managers in separate parts of the GUI. Here is a well known example that puts the details of the layout in a titled border for the panel..

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