Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Setting the Boundary of a Frame

  Asked By: Jose    Date: Mar 08    Category: Java    Views: 697
  

How do we create a border so that the button will
be center of the frame. I am using Panel and Frame
and BorderLayout. What is the use of Insets?<br>HOw
do we implement it in a
program?

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Douglas Sullivan     Answered On: Mar 08

You can try FlowLayout with setVgap(int i) method

 
Answer #2    Answered By: Chad Bradley     Answered On: Mar 08

what if I am using GridLayout............

 
Answer #3    Answered By: Laurel Collins     Answered On: Mar 08

I just wanna separate the BorderLayout.NORTH from the CENTER with gap and from
the boundary of the Frame as we

 
Answer #4    Answered By: Orville Rodriguez     Answered On: Mar 08

The BorderLayout class includes methods for
setting the horizontal and vertical gaps. If you want to
do anything more complicated (i.e. using Insets)
then you will need to use the GridBagLayout. You can
find out more information on all of the layouts from
the Java API documentation. If you haven't already,
download a copy of the JDK documentation and keep it handy
- you will use it a
lot.

 
Answer #5    Answered By: Ludo Ricci     Answered On: Mar 08

I had download the Documentation but had a hard
time understanding it. Why isn't there any example
where i can follow.. can anyone tell me how to uses
those information. cos i really find it hard to
understand

 
Didn't find what you were looking for? Find more on Setting the Boundary of a Frame Or get search suggestion and latest updates.




Tagged: