Set Anti aliasing samples in-game menu

hello, i’m making a game in java and i use a jmonkey canvas inside a Java JPanel.

in the game have a setting menu where can change some settings like enable shadows, shadows filters, enable sound and others.
now i’m trying to change antialising setting but have no results.

some code here

[java]

public class Panel3D extends SimpleApplication {

private JmeCanvasContext ctx;
private JPanel panel;

........................... more code .................

public JPanel getPanel(){
    // Settings
    setPauseOnLostFocus(false);
    // 3D Canvas        
    int width = 1000;
    int height = 600;
    settings = new AppSettings(true);
    settings.setWidth(width);
    settings.setHeight(height);
    settings.setSamples(0);
    settings.setVSync(true);
    super.setSettings(settings);    
    super.setDisplayFps(true);
    super.setDisplayStatView(false);
    super.createCanvas();
    ctx = (JmeCanvasContext) super.getContext();
    Dimension dim = new Dimension(width,height);
    ctx.getCanvas().setPreferredSize(dim);  
    // View Panel        
    panel = new JPanel(new BorderLayout());
    panel.add(ctx.getCanvas(),BorderLayout.CENTER);
    return panel; 
}

public void setAntiAliasingLevel(int level){
    settings.setSamples(level); // 0,2,4,8,16...
    super.setSettings(settings);
    super.restart();
    ctx.restart();        

}
[/java]