facing a typical problem with Layouts
Hi All,
I have a Parent window as JFrame and child window(i.e. popup window) as dialog, popup window consists of some text fields, on clicking OK button all these text field values should appear on Parent Window. All these are working perfectly fine.
But my problem is with layouts. On parents window i have lots of fields, on expanding of this window all the fields gets adjusted accordingly. it's also working fine.
As soon as i add some values in text fileds of popup window and clicks on OK button and values appearing on the parent window, then after if i try to expand the parent window the fields are not behaving as it used to behave previously(not expanding according to window size). :-(
donno where i am doing wrong. Layout of Parent window is 'BorderLayout' and layout of Popup window some part i am using as 'GridBagLayout' and some part as 'BorderLayout'.
First line of popup window constructor is :
super(frame, modal); //frame refers to parent window
Plz help me in this regard.
Regards,
Ravi Kumar
# 1
> donno where i am doing wrong.
Neither do we, since we are not mind readers.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the posted code retains its original formatting.
# 3
hi sztyopek
Thanks for your reply.
can you be little bit eloborate in ur explanation.
Actually i never used repaint() method in my complete application. So where i have to use it now.
what is this invalidating a textbox ?
Could you please explain me little bit more.
Regards,
Ravi Kumar
# 4
> Actually i never used repaint() method in my complete application. So where i have to use it now.
You should not need to use repaint();
> what is this invalidating a textbox ?
You should not need to use invalidate();
They are only required if you add or remove components on a visible GUI. That is not your problem description
You have already been told we can't help without a SSCCE.