From 12f14b5deeddb6dc9dcb019cf772acb946233270 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Mon, 17 Oct 2016 10:06:37 +0200 Subject: [PATCH] =?UTF-8?q?KeyPressed=20hinzugef=C3=BCgt=20f=C3=BCr=20leic?= =?UTF-8?q?htere=20Eingabe:D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- modpack/1.7.10/mods/hi.jar | 0 modpack/1.7.10/mods/test.jar | 0 modpack/modpack/mods/hi.jar | 0 modpack/modpack/mods/test.jar | 0 src/forgemodpackbuilder/GUI.form | 3 +++ src/forgemodpackbuilder/GUI.java | 14 ++++++++++++++ 7 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 modpack/1.7.10/mods/hi.jar create mode 100644 modpack/1.7.10/mods/test.jar create mode 100644 modpack/modpack/mods/hi.jar create mode 100644 modpack/modpack/mods/test.jar diff --git a/.gitignore b/.gitignore index 68fa45d..f904d2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /nbproject/private/ -/build/ \ No newline at end of file +/build/ +/dist/ \ No newline at end of file diff --git a/modpack/1.7.10/mods/hi.jar b/modpack/1.7.10/mods/hi.jar new file mode 100644 index 0000000..e69de29 diff --git a/modpack/1.7.10/mods/test.jar b/modpack/1.7.10/mods/test.jar new file mode 100644 index 0000000..e69de29 diff --git a/modpack/modpack/mods/hi.jar b/modpack/modpack/mods/hi.jar new file mode 100644 index 0000000..e69de29 diff --git a/modpack/modpack/mods/test.jar b/modpack/modpack/mods/test.jar new file mode 100644 index 0000000..e69de29 diff --git a/src/forgemodpackbuilder/GUI.form b/src/forgemodpackbuilder/GUI.form index cc7b9d9..34b2eea 100644 --- a/src/forgemodpackbuilder/GUI.form +++ b/src/forgemodpackbuilder/GUI.form @@ -123,6 +123,9 @@ + + + diff --git a/src/forgemodpackbuilder/GUI.java b/src/forgemodpackbuilder/GUI.java index 3d654a8..7045245 100644 --- a/src/forgemodpackbuilder/GUI.java +++ b/src/forgemodpackbuilder/GUI.java @@ -5,6 +5,7 @@ */ package forgemodpackbuilder; +import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; import java.util.logging.Level; @@ -61,6 +62,11 @@ public class GUI extends javax.swing.JFrame { jLabel1.setText("Version"); + jList1.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + jList1KeyPressed(evt); + } + }); jScrollPane1.setViewportView(jList1); jList1.getAccessibleContext().setAccessibleDescription(""); @@ -346,6 +352,14 @@ public class GUI extends javax.swing.JFrame { } }//GEN-LAST:event_jButton7ActionPerformed + private void jList1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jList1KeyPressed + // TODO add your handling code here: + if (evt.getKeyCode() == KeyEvent.VK_ENTER) { + System.out.println("ENTER pressed"); + jButton1ActionPerformed(null); + } + }//GEN-LAST:event_jList1KeyPressed + DefaultListModel dim2 = new DefaultListModel(); /**