arranging components in jpanel in a vertical manner...?
mike lim
Greenhorn
Joined: Jul 18, 2012
Posts: 2
posted
0
Hi guys, I'm just starting in java... or coming back to using it again... I'm not that good so I was wondering after reading on my old java book, how to arrange components such as labels and buttons in a panel in a vertical position, much like a webpage link panel on the left side where the user chooses which page he wants to go to... the default layout of a jpanel is a flowlayout I think and all the components I add to it just automatically arranges itself horizontally which is really far from what I want to do... Hope any help would be ok... it would be easier if it was html where I just add a <br> in order to skip a line and then just add each separate link... is there some sort of absolute positioning for components in a panel or contentpane where I can use to store jlabels/jbuttons so I can arrange the components in a way that can be more user friendly... thanks again...
mike lim
Greenhorn
Joined: Jul 18, 2012
Posts: 2
posted
0
without third party gui editing software please... thanks... only hard code...
> is there some sort of absolute positioning for components in a panel
you set the layout to null, but then you are totally responsible for handling it all.
you might think absolute positioning is the easiest, but it will only create headaches