Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // File Name : HomePage.java
- package com.mycompany.myapp.gui;
- import com.codename1.ui.Form;
- import com.codename1.ui.Label;
- import com.codename1.ui.layouts.BoxLayout;
- /**
- *
- *@author mabt
- */
- public class HomeForm extends Form {
- Form current; //pour indiquer la destination du boutton "back".
- public HomeForm() {
- current=this;
- setTitle("Home");
- setLayout(BoxLayout.y());
- add(new Label("Choose an option"));
- Button btnAddTask = new Button("Add Task");
- Button btnListTask = new Button("List Tasks");
- btnAddTask.addActionListener(e-> new AddTaskForm().show());
- btnListTasks.addActionListener(e-> new ListTasksForm().show());
- addAll(btnAddTask,btnListTasks);
- }
- }
Add Comment
Please, Sign In to add comment