I am trying to design a GUI with a name, password and login button.I have a BorderLayout in the North for the GUI title. In the middle I have a JPanel with a BorderLayout.CENTER.However I am having problems separating name and password.It is alll cominh up on one line. How can I separate the two? I want the "Name" + its JTextField on top and "Passoword" + its Textfield below?I have tried the GridLayout but it doe not seem to work. Below is the code for my panel.
You're setting the GridLayout for something called "myPane", but you add all the elements to something called "i".
Ping & DNS - updated with new look and Ping home screen widget
Joined: Feb 07, 2006
I have tried adding everything to myPane GridLayout and seem to be getting these large boxes. Can anyone help me preferrably with the code or something that I can use to separate these two? I do not think I am even suppose to use the GridLayout.
basic scenario: frame panel1 with label(title) in frame's borderLayout.north panel2(gridlayout(2,2,10,10)) with login fields in frame's borderlayout.center panel3 with button in frame's borderlayout.south at the end of the constructor, just before frame.setVisible(true), have this line frame.pack();