Is there a “Group Box” equivalent in Java Swing?

前端 未结 7 1506
野的像风
野的像风 2021-01-30 19:50

Trying to build a GUI application in Java/Swing. I\'m mainly used to \"painting\" GUIs on the Windows side with tools like VB (or to be more precise, Gupta SQLWindows... wonder

7条回答
  •  礼貌的吻别
    2021-01-30 20:43

    Here's a quote from the JRadioButton javadocs since you brought up radio buttons.

    An implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user. Used with a ButtonGroup object to create a group of buttons in which only one button at a time can be selected. (Create a ButtonGroup object and use its add method to include the JRadioButton objects in the group.)

    Note: The ButtonGroup object is a logical grouping -- not a physical grouping. To create a button panel, you should still create a JPanel or similar container-object and add a Border to it to set it off from surrounding components.

提交回复
热议问题