|
i want to set textfields and button on desire place in frmes how i can i do that
plz tell me i am new
|
|
|
Create a JPANEL and set it with a desired layout, such as GRIDLAYOUT, using this arrange your buttons and textfields(i.e. add them to the panel). Then add the JPanel to your container. You will need to create a frame also if you have not done this already, an easy way would be to make your class extend JFrame. i.e.
class myclass extends JFrame
Just make sure you import the appropriate packages also. java.sun.com has great demos of GUIS with code in them which allows you to find out how stuff is put together.
hope this helps.
|
|
|
Sorry forget to say, also when adding your panel to the container. If you are using Borderlayout on the container, set the location where you would like it to be displayed, i.e. NORTH, SOUTH, EAST, WEST OR CENTRE.
|
|
|
|
|
|
|
// |