anchorButtonの使い方ですけど、anchorButtonを押して違うパネルに移る処理ですが

public void componentAction(Component source, int type, int param)
{
if(source == anchorSelect1)
{
Display.setCurrent(MainPanel);
}
}

これだと動かないのですがどうすればいいんでしょうか?
anchorButtonの使い方についての記載があるページがあまりないのでいまいち使い方がわかりません