How to position components in a JFrame?
问题 jframe = new JFrame("Admin"); jpanel = new JPanel(); jpanel.setLayout(new FlowLayout()); jframe.add(jpanel); userLabel = new JLabel("Username:"); jpanel.add(userLabel); userLabel.setBounds(100, 100, 30, 30); userTxtfield = new JTextField(15); jpanel.add(userTxtfield); passwordTxtfield = new JTextField(15); jpanel.add(userTxtfield); jpanel.add(passwordTxtfield); passwordLabel = new JLabel("Password:"); jpanel.add(passwordLabel); userLabel.setBounds(100, 100, 30, 30); loginButton= new JButton(