Hey all. I'm making a program which uses many buttons and a textfield. I need help and some explaining on how to organise components within a panel.
mainPanel.add(BorderLayout.NORTH,display); mainPanel.add(BorderLayout.CENTER,background); mainPanel.add(BorderLayout.EAST,buttonBox); mainPanel.add(BorderLayout.WEST,buttonBox2 );
All components (the buttons within the background panel,the buttons within buttonbox1/2 and the display field) are "sticked". How can i add a gap between .NORTH and .CENTER?
i have tried :
Also,The buttons in buttonboxes (box class) are Y_AXIS aligned but they also have no gap.
i tried buttonBox.createGlue(); but also nothing.
Ive been reading and messing around with gridLayouts,boxLayouts,borderFactory for a good 3 hours now...
Anyway,apart from my program,any small "guide" on how to easily play with components arrangement would be awesome.Thanks!