The package name can be specified in an import. Following your example, suppose to have this class that extends the Form class:
package net.informaticalibera.tests.folder1;
import com.codename1.ui.Form;
import com.codename1.ui.layouts.Layout;
public class Form1 extends Form{
public Form1() {
}
public Form1(Layout contentPaneLayout) {
super(contentPaneLayout);
}
public Form1(String title) {
super(title);
}
public Form1(String title, Layout contentPaneLayout) {
super(title, contentPaneLayout);
}
}
If you want to use that class in another package, you have to use an import. For example:
import net.informaticalibera.tests.folder1.Form1;
public class YourClass {
[your other code]
Form form1 = new Form1("Hi World", BoxLayout.y());
form1.add(new Label("Hi World"));
form1.show();
}
Usually the IDEs allow to insert the imports automatically.
Alternatively, if you have any reason to don't use the import (for example when a class name conflict occurs), you can use fully qualified name to avoid the import statement:
Form form1 = new net.informaticalibera.tests.folder1.Form1("Hi World", BoxLayout.y());
form1.add(new Label("Hi World"));
form1.show();
For a detailed explanation: https://beginnersbook.com/2013/03/packages-in-java/