BraginiNI
BraginiNI

Reputation: 586

full screen contentPanel ext gwt

I need to implement full screen ContentPanel in ext gwt. I use setSize method, but as params I can specify only resolution.

public class HomePage extends ContentPanel {

public HomePage() {

    setSize(1024,768);

I want to have panel that will fill all window in each browser with different monitor resolution. So how can I use setsize method to solve this problem? Thanks!

Upvotes: 0

Views: 1732

Answers (2)

sonpham
sonpham

Reputation: 11

In GXT 3, I used:

private static final int WIDTH_SCREEN = XDOM.getViewportWidth();
private static final int HEIGTH_SCREEN = XDOM.getViewportHeight();

And after that use setWidth, setHeight

Upvotes: 1

Upgradingdave
Upgradingdave

Reputation: 13056

Instead of setting the size, maybe try setting a layout that will expand. Maybe something like this (hasn't been tested):

setLayout(new FitLayout()); 

Upvotes: 1

Related Questions