If you're looking to use a normal tab pane where the tab bar is directly above the content, then it's much easier to just use TabPanel directly, which combines the tab bar and content switching logic. If you really are doing a tab bar separate from the content, you might still look at the TabPanel code to see how it is implemented.
On Apr 24, 1:08 pm, İNGİLTERE EMRE BEY <[email protected]> wrote: > hi, > > I am new to GWT, basically i am triying to do using dockpanel and tab > bar to load page in dockpanel center page, > > example of my code blow > > TabBar bar = new TabBar(); > bar.addTab("Books"); > bar.addTab("Home"); > > bar.addSelectionHandler(new SelectionHandler<Integer>(){ > > @Override > public void onSelection(SelectionEvent<Integer> > event) { > // TODO Auto-generated method stub > if(event.getSelectedItem()==0) pan.add(new > Page1(), > DockPanel.CENTER); > if(event.getSelectedItem()==1) pan.add(new > Page2(), > DockPanel.CENTER); > } > > can you please suggest better way of doing this or how to i manage to > run this one > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. 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.
