[Resolvido?!?]GridBagLayout após estar tudo pronto !?!?

5 respostas
guilherme.dio

Olá, estou com um projeto praticamente finalizado, porém, desde começo utilizei um código para redimensionar os componentes em tela inteira, sem perder suas posições no JFrame:

private void maximizaFrame()
    {
        Insets in = Toolkit.getDefaultToolkit().getScreenInsets(this.getGraphicsConfiguration());
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        int width = d.width-(in.left + in.top);
        int height = d.height-(in.top + in.bottom);
        this.setSize(width,height);
        this.setLocation(in.left,in.top);
    }

Porém, testei em outros monitores, diferentes do meu, e não ficou bom, porque como estou utilizando MDI, os frames internos acabavam por ficarem maiores do que o JFrame principal, e alguns components do internal ficam fora da área de manipulação, portanto estou querendo introduzir o GridBagLayout, para maximizar o frame ao invés deste código ai, porém como ja montei todo o JFrame principal pelo netbeans, e etc…como posso inserir o layout sem ter que refazer tudo ?

5 Respostas

lina

Hello,

You don’t have choice.

Bye!

guilherme.dio

lina:
Hello,

You don’t have choice.

Bye!

Really??

What will i do now? i dont have time to modify everything, im lost !

lina

guilherme.dio:
lina:
Hello,

You don’t have choice.

Bye!

Really??

What will i do now? i dont have time to modify everything, im lost !

Really.

I can’t help you, my friend. But if you stop surfing the net, I think you can do the job !

guilherme.dio

hahahha… actually im at work(nothing to do for now), so i dont have Netbeans, i only use VisualStudio here for VB and C# programming, but when i get back home i will delete my main Frame will do it all again, but using this Layout.

lina

You don’t have to delete anything, just set the right points in the layout.

:wink:

Criado 29 de junho de 2011
Ultima resposta 29 de jun. de 2011
Respostas 5
Participantes 2