I am making a simple maze program where the user can create walls, paths, the start and the finish, click solve and the maze will be solved. To do this I have a java JFrame with the size 640×480. On the left side of the JFrame I have a JPanel with top left coordinates of 0,0 and the size is 480×480. This is the area where the maze will be drawn and where the user can specify the walls and paths. The problem I have is when I start adding buttons and radio buttons on the right side of the screen. Every layout I use (such as boxlayout, springlayout, flowlayout or grid layout) does not seem to do what I would like. I would like to have the JPanel stay were it is (on the very right with the size 480×480) and have the buttons arranged top-down starting at 480 (because this is where the JPanel ends). What I am thinking I need is ton specify where the layout starts and not to automatically arrange the JPanel. Is there any way that I can do this? Or do I just need to have a null layout?
Share
take a look at this answer of mine:
Positioning of components (how to place a few buttons center screen same size)
Jframe not the right size when its executed, any reason why?
What you want to do is have a JPanel 480×480 over a set of radio button.
Just use a BoxLayout with PAGE_AXIS and follow my guide in the link.