• 2022-06-06
    在JFrame中添加JMenuBar对象,应使用的方法为
    A: setJMenuBar()
    B: add()
    C: addJMenuBar()
    D: setJMenu()
  • A

    内容

    • 0

      frame.getConnectPane().add(button)能实现向frame(JFrame的对象)中添加button(JButton的对象)。

    • 1

      下列选项中能实现向frame(JFrame的对象)中添加button(JButton的对象)的方式是() A: add(button) B: frame.getConnectPane().add(button) C: frame,add(button) D: frame.setConnectPane(button).add()

    • 2

      请问如下哪个方法可以将JMenuBar加入JFrame中? ( )

    • 3

      在Swing中,创建菜单使用下列()三个类。 A: JMenuBar、JMenu、JMenuItem B: JMenuPanel、JTable、JMenu C: JPanel、JFrame、JButton D: JList、JFrame、JMenuItem

    • 4

      JFrame中不能直接用add()方法来添加子组件