Trick of Positioning the Containers of JFrame

Many developers want their own Layout Manager with user-defined so JAVA has provided a separate method for the every container of JFrame Component and that method is setBounds(). This method helps the developers to position the container as per their need .

About SetBounds() method:

This method consists four parameter

We can arrange the containers with the help of this method easily.

A example of this method is shown below:

And the output must be like this:

Login Panel Output

Login Panel Output

2 thoughts on “Trick of Positioning the Containers of JFrame”

Leave a Reply