展开全部
代码62616964757a686964616fe59b9ee7ad9431333366303137如下:import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class App extends JFrame {
private JComboBox cbxNicks;
// 昵称
private String[] nicks = {
"测试", "李二牛", "牛大胆",
"张三", "李四", "王五"
};
public App() {
this.setSize(350, 150);
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLayout(new FlowLayout());
JTextField txtNick = new JTextField();
txtNick.setPreferredSize(new Dimension(100, 23));
this.add(txtNick);
JButton btnQuery = new JButton("查询")