how do I can get values from layout Manager

  • Thread starter Frédéric Colombero
  • Start date
F

Frédéric Colombero

Hi
I wrote a java progarm and I would like to know, how do I can get the
positions
of two JPanel inside a JFrame which are in north and south.
Ex: BorderLAyout.NORTH, BorderLAyout .SOUTH.
Thanks you very much
Fred

--
Frédéric Colombero Presales/Consulting java Real Time
Phone: (33) 1 41 48 10 19 Fax: (33) 1 41 48 10 20
(33) 6 30 67 52 48
E-Mail: (e-mail address removed)
Aonix 66-68 Av Pierre Brossolette 92247 Malakoff, France
WEB: http://www.aonix.fr or http://www.aonix.com



Les informations contenues dans le present message et dans tous les
fichiers electroniques qui y sont attaches, sont strictement
confidentielles et ne sont destinees qu'a l'usage de la personne dont le
nom apparait ci-dessus et de toute autre personne specifiquement
autorisee a les recevoir. Si vous n'etes pas la personne a qui ces
informations sont destinees, nous vous informons qu'il est strictement
interdit de les diffuser, de les utiliser ou d'en faire des copies. Si
vous avez recu ce message electronique par erreur, ou si des problemes
de transmission surviennent, nous vous remercions d'en aviser
immediatement l'expediteur ou de telephoner au (33-1) 41.48.10.19.
Attention : Tout message electronique est susceptible d'alteration.
AONIX decline toute responsabilite au titre de ce message s'il a ete
altere, deforme ou falsifié.



This message and any attachments (the « message « ) is intended solely
for the addressees and is confidential. If you receive this message in
error, please delete it and immediately notify the sender (33-1)
41.48.10.19. Any use not in accord with its purpose, any dissemination
or disclosure, either whole or partial, is prohibited except formal
approval. The internet can not guarantee the integrity of this message.
AONIX shall not therefore be liable for the message if modified.
 
T

Thomas Weidenfeller

[confidential stuff]

I am sorry, but in order to answer you, I would have to violate some of
the terms in your 30+ lines of legal disclaimer.

/Thomas
 
F

Frédéric Colombero

Hi Thomas,
What's the problem ?
I don't understand what you mean.
I have a JFrame and inside two JPanel one of them is on NORTH and the second
one is on the SOUTH.
And When I get the Container which is the JPanel (please see code below), I
would like to know if this one is in the north on the JFrame
or in the SOUTH or in the EAST, WEST or CENTER.
I would to know how to get the value of the position of this JPanel inside
the JFrame.
That 's all.
If you can helpme about this it will be very great.
Thanks a lot
Best regards
Frederic.

if (c instanceof JPanel){

String panel = "panel"+compPanel;

parentPanel = panel;

String allocPanel = ((Container)c).getClass().getName()+" "+panel+"= new
"+((Container)c).getClass().getName()+"();";

String namePanel = panel+".setName(\""+((Container)c).getName()+"\");";

//********** my proble is to do a array with the name of
BorderLayout.NORTH, etc...) *****//

String addPanel = allocPanel+"
this.getContentPane().add("+panel+","+borderLayout[compborderLayout]+");";

compborderLayout++;

compPanel++;

bodyProgram.append(addPanel+" "+namePanel);

sons = true;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top