Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo!

Das kann doch nicht sein, dass ich mir bei einem KeyDown die Zähne ausbeiße:

Folgender Code:

public boolean keyDown( Event e, int key )

   {  

      if(key == 13){

        return true;  

      }


dazu folgende Fragen:

1. Wie und wo wird das Event e definiert?

2. Wie und wo wird der Integer key definiert?

3. Wie rufe ich Methode keyDown( Event e, int key ) auf?

Entschuldigt diese laienhaften Fragen...vielleicht stehe ich ja auch einmal vor dem Durchbruch!

das ist vielleicht das eigentliche Problem...

Aus allen Beispielen, die ich im Web gefunden oder aus Büchern herausgelesen habe, gibt es nur dieses Bruchstück!

sehr unbefriedigend

Servus, das einzige keyDown, das ich kenne, ist seit dem JDK 1.1 deprecated und aus der Klasse Component.

Schau Dir besser ein aktuelles Tutorial an, wenn Du mit Event Handling anfangen willst.

Trail: Creating a GUI with JFC/Swing (The Javaâ„¢ Tutorials)

Peter

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.