How to set bounds to components in a JPanel?

1.7k views Asked by At

I have added the components to a JPanel and that JPanel to a JScrollPane. But I need to give specific bounds to the components that I have added(without using a layout manager).When use a null layout to set the bounds that scroll bar is not visible.

1

There are 1 answers

0
Ben Dale On

It's best to use a layout manager. They might be a little "scary" (especially GridBagLayout) but once you get your head around them, they're really easy to use and implement.