Campbell Ritchie wrote:Nonononononononono. The display is simply a display. You need to get the logic designed and working before trying to draw a GUI. Remember that the logic should work completely independently of the GUI. Then you can add the GUI to it.
Ivan Gortschakow wrote:. . . I thought it would be the best to finish the design and focus at the logic second
Campbell Ritchie wrote:Follow RC's suggestions. But don't try to do everything at once. Start with your number buttons and get them working. By the way, but “.” on the bottom left and “0” at the bottom centre. Then add one component at a time.
How are you creating the number buttons?
Rob Camick wrote:The key to any complex layout is to break the layout down logically into smaller panels and to use the appropriate layout manager for each panel.
You just identified 3 logical groupings (west, center and east).
So the place to start is with a BorderLayout. It has LINE_START, CENTER and LINE_END constraints.
See the Swing tutorial on Layout Managers for more information and examples.
Note the panels you add to the west, east will expand in height if the frame height is increased.
You can prevent this by using a "wrapper panel". Something like: