Files
openide/plugins/javaFX/resources/fileTemplates/j2ee/javafx-HelloApplication-groovy.groovy.ft
Yuriy Artamonov 836bff08bd IDEA-268767 New JavaFX project wizard
GitOrigin-RevId: 122ff5370e645d129f777f4319cbe32780675f57
2021-05-12 21:27:23 +00:00

24 lines
655 B
Plaintext

package ${context.rootPackage}
import groovy.transform.CompileStatic
import javafx.application.Application
import javafx.fxml.FXMLLoader
import javafx.scene.Parent
import javafx.scene.Scene
import javafx.stage.Stage
@CompileStatic
class HelloApplication extends Application {
@Override
void start(Stage stage) {
def fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"))
def scene = new Scene(fxmlLoader.load() as Parent, 320, 240)
stage.setTitle("Hello!")
stage.setScene(scene)
stage.show()
}
static void main(String[] args) {
launch(HelloApplication)
}
}