Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add textfield #22

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '22'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java 22.0.1+8-tem
16 changes: 12 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ version '1.0-SNAPSHOT'

repositories {
mavenCentral()
// maven { url 'https://oss.sonatype.org/content/groups/public' }
// maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
// maven { url 'https://jitpack.io' }
// maven { url 'https://sandec.jfrog.io/artifactory/repo' }
}


ext {
junitVersion = '5.10.2'
}

sourceCompatibility = '21'
targetCompatibility = '21'
sourceCompatibility = '22'
targetCompatibility = '22'

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
Expand All @@ -30,14 +35,17 @@ application {
}

javafx {
version = '21'
version = '22.0.1'
modules = ['javafx.controls', 'javafx.fxml']
}

dependencies {

testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")

// implementation('com.tobiasdiez:easybind:2.2.1-SNAPSHOT') {
// exclude group: 'org.openjfx'
// }
}

test {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
1 change: 0 additions & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
requires javafx.controls;
requires javafx.fxml;


opens org.jabreftest.test.javafxreproducer to javafx.fxml;
exports org.jabreftest.test.javafxreproducer;
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
package org.jabreftest.test.javafxreproducer;

import java.io.IOException;

import javafx.application.Application;
import javafx.beans.property.SimpleStringProperty;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.DialogPane;
import javafx.scene.control.TextField;
import javafx.scene.control.TitledPane;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

import java.io.IOException;

public class HelloApplication extends Application {

@Override
public void start(Stage stage) throws IOException {
Dialog<String> alert = new Dialog<>();
Expand Down Expand Up @@ -55,7 +62,11 @@ public void start(Stage stage) throws IOException {
createTitledPane("Custom", false, 200.0, 200.0));

TextField textField = new TextField();
textField.setPromptText("Type something and then press Ctrl+Z.");
vbox.getChildren().add(textField);
SimpleStringProperty textProperty = new SimpleStringProperty();
textProperty.addListener((_, _, newValue) -> textField.textProperty().set(newValue));
textField.textProperty().addListener((_, _, newValue) -> textProperty.set(newValue));

dlgPane.setContent(vbox);

Expand Down