Solved

AWT

Posted on 2002-04-05
2
287 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
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 50 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse java  build path 6 56
eclipse shortcuts 9 54
servlet example 11 40
How to execute a Python program and gather return output in Java 2 29
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

770 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