package teste1;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.time.LocalDate;
import jfxtras.scene.control.agenda.Agenda;
public class Teste1 extends Application
{
@Override
public void start(Stage primaryStage)
{
// Creates an Agenda.
Agenda agenda = new Agenda();
// Adds an Appointment to it.
agenda.appointments().addAll
(
new Agenda.AppointmentImplLocal()
.withStartLocalDateTime(LocalDate.now().atTime(4, 00))
.withEndLocalDateTime(LocalDate.now().atTime(15, 30))
.withDescription("It's Time!")
.withAppointmentGroup(new Agenda.AppointmentGroupImpl().withStyleClass("Group1")));
// Shows the Agenda.
primaryStage.setScene(new Scene(agenda, 800, 600));
primaryStage.show();
}
public static void main(String[] args)
{
launch(args);
}
}
我将 jfxtras-agenda-8.0-r5.jar 和 jfxtras-controls-8.0-r5.jar 导入到项目中。
当我运行这段代码时,它给了我一个“java.lang.reflect.InvocationTargetException”。谁能告诉我代码有什么问题?