Re: JTextField-Text Access
actually earlier i used "BorderLayout"....
but i put all my 3 buttons in south....
but i got only 1 button covering the whole south part of the frame....
and when i maximise my window it showed me all the buttons....
so that's why i decided to move them by myself....
Re: JTextField-Text Access
and i used them on JPanel....
Code:
panel1.add(tfield1,BorderLayout.PAGE_START);
i used this code....and i'm getting a flowlayout....
Re: JTextField-Text Access
With BorderLayout you can only put one component in any one region. If you want to add more than one component to a region you have to add the components to a container component such as JPanel and add the container component to the region.
So, if you want to add 3 buttons to the SOUTH region then you need to add those 3 buttons to a JPanel and add the JPanel to the SOUTH region. There are a number of layout managers you could use in the JPanel to layout the buttons but FlowLayout with a center alignment and small inter component spacing is probably the one you want. ie
Code:
new FlowLayout(FlowLayout.CENTER);
Re: JTextField-Text Access
got it....thanks a lot....