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.

Prozess beendet sich nicht

Empfohlene Antworten

Hi, hab mit Eclipse und Jigloo ein Programm mit Swing erstellt.

Wenn ich nun rechts oben auf das X für Schließen klicke geht das Programm zu, allerdings kann man im Task-Manager unter Prozesse sehen, dass ein gewisser javaw.exe weiterläuft. Je öfter ich das ganze mache, desto mehr Prozesse von javaw.exe verbleiben im Task-Manager.

da bibt es eine methode namens setDefaultCloseOperation die ein EXIT_ON_CLOSE mitkriegt. sonst windowlistener mitgeben und dor ein system.exit(0) machen.

bigredeyes

Hi bigred,

hab jetzt Window Listener eingefügt.

Es kommt kein Fehler, aber der Prozess beendet sich immer noch nicht

private void initGUI() {

try {

AnchorLayout thisLayout = new AnchorLayout();

getContentPane().setLayout(thisLayout);

this.setTitle("Arbeitszeit - Rechner");

this.addWindowListener(new WindowAdapter() {

public void windowClosed(WindowEvent evt) {

rootWindowClosed(evt);

}

}

und

private void rootWindowClosed(WindowEvent evt) {

System.out.println("this.windowClosed, event=" + evt);

System.exit(0);

}

Warum hast Du den 2-Zeiler aus dem WindowAdapter ausgelagert?

@Newlukai: Hab ne Handler Method gemacht und da schreib ich dann das rein, was getan werden soll, wenn das fenster geschlossen wird

Funktiert nun, hab den Fehler gefunden.

Nicht rootWindowClosed

sondern rootWindowClosing

nun gehts :marine

  • 2 Wochen später...

JFrame#setDefaultCloseOperation(..)

JFrame.DISPOSE_ON_CLOSE

JFrame.EXIT_ON_CLOSE

JFrame.DO_NOTHING_ON_CLOSE

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.