Hi, I am a beginner in Java . currently i m trying to make a calculator. So far i have made the GUI of the calculator but the problem is that i am unable to remove horizontal spaces between the rows of buttons. i want my calculator to look like the one we get with our windows operating system. There, the buttons are packed . can anyone help me out in removing those spaces. My code so far is as follows:
Thanks Brian. I will now try with GridLayout.
As for my left aligned code , let me clarify that to you: since i m a beginner,and since I have started studying Java all by myself just by browsing material and through books , and it's only a month that i have started studying Java, I am not practiced in writing the correct way you are referring.(I am still using notepad for writing my code and using command line for compilation.) i will now download some Integrated Development Environment so that my code is not left aligned or try to make it that way myself. Anyways , thanks for your suggestions.