KeyPressed hinzugefügt für leichtere Eingabe:D
This commit is contained in:
parent
d5a340c319
commit
12f14b5dee
7 changed files with 19 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
/nbproject/private/
|
||||
/build/
|
||||
/build/
|
||||
/dist/
|
0
modpack/1.7.10/mods/hi.jar
Normal file
0
modpack/1.7.10/mods/hi.jar
Normal file
0
modpack/1.7.10/mods/test.jar
Normal file
0
modpack/1.7.10/mods/test.jar
Normal file
0
modpack/modpack/mods/hi.jar
Normal file
0
modpack/modpack/mods/hi.jar
Normal file
0
modpack/modpack/mods/test.jar
Normal file
0
modpack/modpack/mods/test.jar
Normal file
|
@ -123,6 +123,9 @@
|
|||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jList1KeyPressed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
|
|
|
@ -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();
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue