Board index » jbuilder » Problems with JPanel presentation.

Problems with JPanel presentation.


2005-01-18 06:00:44 PM
jbuilder22
Hi group,
I made an aplication that has got only one panel. Now I need to create a new
panel for presentation of messages to users.
I tryed to create a JDialog but I can't show it correctly.
From the first panel I created this code:
Mensagem m = new Mensagem(this,"Aviso!",true); // Mensagem extends JDialog
//Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = m.getSize();
if (frameSize.height>screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width>screenSize.width) {
frameSize.width = screenSize.width;
}
m.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height -
frameSize.height) / 2);
m.setVisible(true);
The Dialog box apears but I have to redimension it so I can see something,
because only the dialog's (window) top bar is showed.
What could be appening?
Thanks in advance,
Nuno Paquete
 
 

Re:Problems with JPanel presentation.

On 1/18/2005 at 5:00:44 AM, Nuno Paquete wrote:
This does not seem to have anything to do with the IDE, so I have set
follow-ups to "borland.public.jbuilder.java.swing".
Quote
The Dialog box apears but I have to redimension it so I can see
something, because only the dialog's (window) top bar is showed.
What could be appening?
The code computes the size for the dialog box, but it does not seem to be
actually setting the size.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html
 

Re:Problems with JPanel presentation.

Sorry if this not the best place to post this message.
Thanks anyway.
"John McGrath [TeamB]" < XXXX@XXXXX.COM >escreveu na mensagem
Quote
On 1/18/2005 at 5:00:44 AM, Nuno Paquete wrote:

This does not seem to have anything to do with the IDE, so I have set
follow-ups to "borland.public.jbuilder.java.swing".

>The Dialog box apears but I have to redimension it so I can see
>something, because only the dialog's (window) top bar is showed.
>What could be appening?

The code computes the size for the dialog box, but it does not seem to be
actually setting the size.

--
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html
 

{smallsort}