Suvojit Chakraborty wrote:I thought my post was erased as I could not find it in its original location.
Suvojit Chakraborty wrote:Thank you so much for posting reply. I thought my post was erased as I could not find it in its original location.
I have read the suns document on Gridbaglayouts and learned a lot. But I have found it difficult to implement the things practically. It will be great if you can share some sources on gridbag layout which show practical examples and explains it in better way.
I have also executed your code and it looks perfect. However I dont understand why does your code's applet has grey background in which button is blue and labels are bold Where as in my case applet has white background, Please tell me what did you do in your code which makes it behave like this?? I could not spot any reason
Also I am posting my modified code in which I have set ipadx,ipady etc as per your suggetion, but still there are layout problems which are:
1. You will notice there is unwanted space is there between the rows, even though I mentioned them to be on consequent rows.
2. Also I dont understand why does the total char row which is hidden initially and is supposed to be displayed on click of enter, does not get displayed on pressing enter. It get displays when I resize the window or remove focus from applet and again gives focus to the applet. It seems to me that the paint process is not happening in this case but I dont understand why? I have made a call to repaint from inside the event handler.
Consider Paul's rocket mass heater. |