Skip to content

Instantly share code, notes, and snippets.

@CAD97
Created March 13, 2017 05:51
Show Gist options
  • Select an option

  • Save CAD97/f66c7f1c668168da8965a123ec16369a to your computer and use it in GitHub Desktop.

Select an option

Save CAD97/f66c7f1c668168da8965a123ec16369a to your computer and use it in GitHub Desktop.
<?import javafx.scene.control.TextField?>
<?import tornadofx.Field?>
<?import tornadofx.Fieldset?>
<?import tornadofx.Form?>
<Form xmlns="http://javafx.com/javafx/null" xmlns:fx="http://javafx.com/fxml/1">
<Fieldset>
<!--Field text=""-->
<Field>
<TextField/>
</Field>
</Fieldset>
</Form>
import javafx.application.Application
import tornadofx.*
class Main : App(Issue271::class)
fun main(args: Array<String>) = Application.launch(Main::class.java)
class Issue271 : View("My View") {
override val root: Form by fxml()
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>issue271</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<properties>
<kotlin.version>1.1.0</kotlin.version>
<tornadofx.version>1.7.0</tornadofx.version>
</properties>
<dependencies>
<dependency>
<groupId>no.tornado</groupId>
<artifactId>tornadofx</artifactId>
<version>${tornadofx.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment