正在加载图片...
创建GUI对象 / Create a button with text OK JButton jbtok new JButton("OK") // Create a label with text "Enter your name: JLabel jlbIName new JLabel("Enter your name: )i abel Text Check Rad field Button Display GUI Components Button OK Enter your name: Type Name Here [ Bold O Red Red Green // Create a text field with text "Type Name Here JTextField jtfName new JTextField("Type Name Combo Here") / Create a check box with text bold CHeckbOx jchkBold new CHeckbOx("bold" )i / Create a radio button with text red JRadioButton jrbRed new RAdiobUtton("red")i // Create a combo box with choices red, green, and blue JComboBox icbocolor new JComboBox(new string []f"Red Green""Blue")// Create a button with text OK 创建GUI对象 JButton jbtOK = new JButton("OK"); // Create a label with text "Enter your name: " JLabel jlblName = new JLabel("Enter your name: "); // Create a text field with text "Type Name Here" JTextField jtfName = new JTextField("Type Name Here"); // Create a check box with text bold JCheckBox jchkBold = new JCheckBox("Bold"); // Create a radio button with text red JRadioButton jrbRed = new JRadioButton("Red"); // Create a combo box with choices red, green, and blue JComboBox jcboColor = new JComboBox(new String[]{"Red", "Green", "Blue"}); Button Label Text field Check Box Radio Button Combo Box
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有