Classes for creating simple GUIs in introduction-level programming courses. The classes in this library use Swing classes (JFrame, JPanel, etc.) but do not expose any Swing type or concepts directly. Instead, all functionality is exposed using a simple, single-threaded, and mostly primitive-type-based interface.
The base interface uses a single object of type Window and focuses on drawing operations and global user inputs. An extended interface allows adding "Components", which are objects that draw themselves on the window and can react to local user inputs using simple callbacks.
More Info in the API Documentation.
The library is hosted in a public Maven repository on gitlab.fhnw.ch, where you can check for the latest version and download the JAR file.
For Maven projects, add the following to your pom.xml file:
<dependencies>
<dependency>
<groupId>ch.trick17.gui</groupId>
<artifactId>gui</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>gitlab-maven</id>
<url>https://gitlab.fhnw.ch/api/v4/projects/13172/packages/maven</url>
</repository>
</repositories>
For Gradle projects:
repositories {
mavenCentral()
maven {
url "https://gitlab.fhnw.ch/api/v4/projects/13172/packages/maven"
}
}
dependencies {
implementation 'ch.trick17.gui:gui:1.5.0-SNAPSHOT'
}