hi all, i want to display ten radio buttons on a single panel in the center of the screen.they are coming on left even if i give BorderLayout.NORTH they go towards left.pl. guide regards srijan
posted 16 years ago
It sounds like the panel currently has a FlowLayout as its LaoutManager - which is not surprising, since that's the default for a Panel. You must use setLayout() to change it. However, BorderLayout by itself won't allow you to put 10 different objects in it - just 5 at most (one per region). You probably want GridLayout or GridBagLayout.