Hi, I just started using swing with JFrames and the like. In teaching myself, I wanted to make a simple username/password verification application. Unfortunately, when I try to set up the layout (not using GridLayout) the buttonResize button I add is taking up the entire frame. I tried adding buttonSubmit after buttonResize, and the same problem happened with buttonSubmit.
Code:JButton buttonResize = new JButton("Resize");
ActionListener actionListener2 = new ActionListener()
{
public void actionPerformed(ActionEvent actionEvent)
{
frame.setSize(200, 100);
}
};
buttonResize.addActionListener(actionListener2);
frame.add(buttonResize);
EDIT: Sorry, I just realized there was a section for awt/swing ... Next time I'll remember. ;)Code:usernameLabel.setBounds(0, 0, 96, 16);
passLabel.setBounds(0, 16, 96, 16);
username.setBounds(96, 0, 96, 16);
pass.setBounds(96, 16, 96, 16);
buttonSubmit.setBounds(0, 32, 96, 16);
buttonResize.setBounds(96, 32, 96, 16);

