Create a page for Jt.navigation in a multipage app.

Method Signatures and Parameters

Jt.page(Class<?> pageApp)

pageApp (Class<?>)

The class containing the main method for this page

Returns after .use()

(io.jeamlit.core.JtPage.Builder)

The current io.jeamlit.core.JtPage.Builder value of the component.

Examples

Basic page creation with custom title and icon

 import tech.catheu.jeamlit.core.Jt;

 public class NavigationApp {
     public static class FirstPage {
         public static void main(String[] args) {
             Jt.title("First Page").use();
         }
     }

     public static class SecondPage {
         public static void main(String[] args) {
             Jt.title("Second Page").use();
         }
     }

     public static void main(String[] args) {
         var page = Jt
                 .navigation(Jt.page(FirstPage.class).title("First page").icon("🔥"),
                             Jt.page(SecondPage.class).title("Second page").icon(":favorite:"))
                 .use();
     }
 }

forum

Still have questions?

Go to our discussions forum for helpful information and advice from Jeamlit experts.