?
Solved

AWT

Posted on 2002-04-05
2
Medium Priority
?
293 Views
Last Modified: 2010-03-31
In AWT Frame when we set the layout as FlowLayout Manager
how can we arrange different panels at the desired position inside the frame instead of each panel adding besides the other panel implicitly.

When I used the setBounds() method on the panel, the panel is not positioned according to the given values
but it is just getting added beside an exisitng panel.
0
Comment
Question by:yrrm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Expert Comment

by:mzimmer74
ID: 6921452
Well, that's the way FlowLayout works.  If you want to position panels you'll need to use a different layout.  Depending on how detailed you want to be I'd suggest GridLayout, BorderLayout, or GridBagLayout going from least to most detailed.
0
 

Accepted Solution

by:
cini_gm earned 200 total points
ID: 6922442
If u want to set ur component positions using setBounds, then u must use setLayout(null). ie, If u r setting as null, then u can position ur components where ever u want. Any other layout places ur components in a fixed way.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question