David Chandler's Journal of Java Web and Mobile Development

  • David M. Chandler

    Web app developer since 1994 and Google Cloud Platform Instructor now residing in Colorado. Besides tech, I enjoy landscape photography and share my work at ColoradoPhoto.gallery.

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 223 other followers

  • Sleepless Nights…

    March 2011
    S M T W T F S
  • Blog Stats

    • 1,033,665 hits

A (partially) updated SliderBar for GWT 2.2

Posted by David Chandler on March 23, 2011

The GWT team announced a while back that most of the stuff in the GWT incubator would be moving to GWT proper (including the powerful new cell widgets) and the incubator project would no longer be supported. One of my favorite widgets, the SliderBar, has not yet been moved over. It looks like someone has posted an incubator jar for 2.2, but before I realized that, I extracted the SliderBar from the incubator code, simplified the resource packaging a bit, and updated all the deprecated classes to work with 2.2. It’s not implemented as a Cell so probably won’t play nice with CellTables, but it’s otherwise functional. You can find the code in my listwidget sample project.

To use it in your project, just pull in the source or export it as a jar and remember to put the following in your gwt.xml file:

<inherits name='com.google.gwt.gen2.gen2'/>

Happy sliding!

12 Responses to “A (partially) updated SliderBar for GWT 2.2”

  1. David,

    Thanks for your attention towards this.

    This is an essential component and it still does not exit in GWT. SO it is sad to use it seperately.
    However Can you pls make it available it the download section of http://code.google.com/p/listwidget/source/browse/trunk/src/main/java/com/google/gwt/gen2/

    OR, how can i use it as a jar file?


    • Hi Deepak, no magic to the jar. Just File | Export in Eclipse and include the com.gwt… sources as well as the corresponding gwt.xml file. Then you can reference it in your project’s main gwt.xml just like listwidget.gwt.xml does.

  2. kevin said

    hello sir,
    i searched for sliderbar code. i cant get the sliderbar widgets of GWT… where do i can get silider bar widgets.

  3. James Annesley said

    Hi David,

    Thanks for this widget. Is there an easy way of turning the slider 90 degrees and using it in vertical mode?



    • Haven’t looked at this for a while, but I think you’d have to change quite a few widgets to turn it vertical.

      • James said

        I did actually manage this but changed it so it works like a scrollbar. I have found there is no decent rich client scroll bar widget in GWT. I published the new widget on Google code.

  4. Balazs said


    Have you ever tested it with GWT 2.4?

    • Yes, it works.

      • Balazs said

        Good to know 🙂 For me it looks fine but it does not function as a slider. getValue always return NaN. Here is my code:

        SliderBar sl = new SliderBar(0, 100);
        sl.addValueChangeHandler(new ValueChangeHandler(){

        public void onValueChange(ValueChangeEvent event) {




      • Balazs said

        The solution:

        stepSize has no default value. You have to set it with setStepSize(int)!!!

  5. Dawid said


    The link where was sample is 404. Could you please revert ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: