1
votes

According to the docu of LayeredLayout here (JavaDoc), there is an inset method that can be used for relative positioning. I created a bare pones CN1 project and added this piece, also from the docu:

        Container cnt = new Container(new LayeredLayout());
        LayeredLayout ll = (LayeredLayout)cnt.getLayout();
        TextField searchField = new TextField();
        Button btn = new Button("Search");
        cnt.add(searchField).add(btn);
        ll
          .setInsets(searchField, "1mm auto auto auto")
          .setInsets(btn, "0 auto auto 0")
          .setReferenceComponentLeft(btn, searchField, 1f)
          .setReferenceComponentTop(btn, searchField, 0);

However, I am getting an error that the setInset Method is not found. Looking at the source of LayeredLayout class reveals that it indeed does not have this method.

The method setInsets(TextField, String) is undefined for the type LayeredLayout

I just updated CN1 lib to the latest version as of today.

Any idea?

1

1 Answers

0
votes

I suggest updating your plugin.

In Codename One Settings select Basic and click Update Client Libs.