Hi greg ;) thank you very much for your help. your idea is great, i fixed it like that:
DockPanel panel = new DockPanel(); VerticalPanel vPanel1 = new VerticalPanel(); VerticalPanel vPanel2 = new VerticalPanel(); HorizontalPanel hPanel3 = new HorizontalPanel(); vPanel1.setSpacing(12); vPanel2.setSpacing(10); vPanel1.add(label2); vPanel1.add(label3); vPanel2.add(lb); vPanel2.add(lb2); hPanel3.add(vPanel1); hPanel3.add(vPanel2); panel.add(header,DockPanel.NORTH); panel.add(label,DockPanel.NORTH); panel.add(hPanel3, DockPanel.CENTER); panel.add(button,DockPanel.SOUTH); RootPanel.get().add(panel); so now is it possible to set the length of the DockPanel.North to a different size? Cause in the northPanel is the header filled with a background-color. i think it doesn't look so nice, if it ends after the half way of the display. still a nice sunday, greetings On 6 Dez., 21:11, gregor <[EMAIL PROTECTED]> wrote: > Hi agon, > > FlowPanel is probably not your best bet here. You'll most likely never > get it to do what you want. > > There are millions of ways to organize your display, but you could try > something like this: > > 1) change your main panel (currently FlowPanel) to DockPanel. Then you > can put your header into DockPanel.NORTH. > 2) put each label/listbox pair into a separate HorizontalPanel. You > can then style each cell of these two HP's how you like so they look > the same (e.g. get the label separated from the listbox how you like). > 3) put the HP's you created in 2) into a third HP - again you can > style this to separate/style how the label/listbox pairs look together > (without interfering with how the label/listbox pairs themselves are > styled if you see what I mean). > 4) stick the HP from 3) into DockPanel.CENTER (or LEFT, RIGHT, > whatever) > > In other words break things down into nested boxes (using appropriate > GWT widgets) and style each box how you like. > > regards > gregor > > On Dec 6, 4:47 pm, agon84 <[EMAIL PROTECTED]> wrote: > > > Hello, > > > since a few days i ve started with gwt. now i will created a gui. i > > think it isn't a big problem, but i am not able to go further, cause i > > vn't any idea to fix it. i ve created two listbox's and after i > > pressed run, the listbox's are standing side by side or they are > > standing on upon an other. But i want that they look like that: > > > Label 1 : [ListBox1] > > Label 2 : [ListBox2] > > > Code: > > 1. Java: > > > public class Frontpage implements EntryPoint { > > > ListBox lb = new ListBox(); > > ListBox lb2 = new ListBox(); > > > //Sonderzeichen > > String ouml = "\u00f6"; > > String auml = "\u00e4"; > > String uuml = "\u00dc"; > > > public void onModuleLoad() { > > > FlowPanel panel = new FlowPanel(); > > > Header header = new Header("Willkommen beim"); > > header.setStyleName("headerpane"); > > Label label = new Label("FUSSBALL MANAGER!!!"); > > Label label2 = new Label("Welche Maschine wollen Sie > > kaufen:"); > > Label label3 = new Label("Was m"+ouml+"chten Sie > > ausbauen:"); > > label.setStyleName("label"); > > label2.setStyleName("label2"); > > label3.setStyleName("label3"); > > Button button = new Button("Fertig"); > > button.addClickListener(new ClickListener() { > > public void onClick(Widget sender) { > > Window.alert("Baustelle"); > > } > > }); > > > onListBoxClick(); > > > ; > > > panel.add(header); > > panel.add(label); > > panel.add(label2); > > panel.add(label3); > > panel.add(lb); > > panel.add(lb2); > > > RootPanel.get().add(panel); > > } > > > public void onListBoxClick(){ > > lb.addItem("Maschine 1"); > > lb.addItem("Maschine 2"); > > lb.addItem("Maschine 3"); > > lb.setVisibleItemCount(1); > > > lb2.addItem("Fabrik"); > > lb2.addItem("Geb"+auml+"ude"); > > lb2.addItem("Lager"); > > lb2.addItem("Franchising"); > > lb2.setVisibleItemCount(1); > > }} > > > -------------------------------------------------------------------------------------------------- > > > 2.CSS: > > > .label { > > > top:50px ; > > left:50px ; > > color: white; > > font: normal 20px aharoni, sans-serif; > > border: 1px solid #99bbe8; > > padding: 10px; > > background-color:red; > > > } > > > .header{ > > position:absolute; > > top:0px; > > > } > > > .label2{ > > position:absolute; > > > } > > > .label3{ > > position:absolute; > > top:160 px; > > left:10 px; > > > } > > > .GWT-Button { > > height: 1.7em; > > margin-bottom: 5px; > > padding-bottom: 3px; > > font-size: 12px; > > font-family: aharoni, sans-serif; > > position: absolute; > > top:300px; > > > } > > > .GWT-ListBox { > > width:150; > > position:absolute; > > left:390px; > > > } > > > .GWT-lb2{ > > position:absolute; > > left:120px; > > top:160 px; > > > } > > > .left{ > > position: absolute; > > top:100px; > > left:10px; > > > } > > > .right{ > > position: absolute; > > top:100px; > > left:140px; > > > } > > > -------------------------------------------------------------------------------------------------------------- > > and nothing changed at the html-code. perhabs somebody can help. > > thanks in forward. > > > greetings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---