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.

Dialog

Empfohlene Antworten

Veröffentlicht

Hey Leute,

Könnte mir einer von euch erklären, wie das mit den Dialogen funktioniert? Wenn ich mich an die API halte bekomme ich immer Fehlermeldungen von wegen "Undefined Variable xyz"

Dialog d1 = new Dialog(xyz,"Fehler");

Was soll ich denn sonst als Owner angeben als die Hauptklasse? :confused:

Muss ich den Dialog dann nur noch visible setzen, funktioniert der dann schon oder fehlt noch was?

Grüsse BMAS

Hi

ich weiss nicht was du machst, aber

das hier geht ....

  

import java.awt.*;


class TestFrame {



 public static void main (String args[]){

    Label l = new Label ("Hallo Welt");

    Frame F = new Frame("Test");

    Window w = new Window(F);

    w.show();

    Dialog d = new Dialog(F ,"TestDialog");

    d.add(l);

    d.setSize(200,200);

    d.show();

 }

}


P.S Listener und so was fehlt natürlich noch ...

Hi!

Danke, werde es mal ausprobieren.

PS: War das was da oben stand soo falsch? Aber so stand es in der APi :confused:

Hi,

Deine xyz ist nicht zwangsläufig die Hauptklasse, sondern vielmehr die Klasse an die sich der Dialog "heften" soll. D.h. es muß ein Frame oder ein anderer Dialog sein.

Gruß Markus

Hallo,

nochmal vielen Dank, nach ein paar Anpassungen hat´s dann geklappt...

Grüsse BMAS

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.