🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2146

Log off the application

#2146
From: Ant�nio Ferreira
Date: Fri, 01 Jun 2001 13:36
45 lines
2215 bytes
Hi,

  I did an application that I intend to add the log off functionality. I
would like to clean all resources like System.exit(0) does and restart again
all with java code. I would like to know if that is possible. I implemented
the following code in the main frame but not all resources are released.
Note that I have a class that implements global variables and methods that I
called that VariaveisGlobais and the main object where all begins is the
class run.
  I also used the component dBDisposeMonitor in the main frame(this).

  void jMenuItemLogOff_actionPerformed(ActionEvent e) {
    this.removeAll();
    this.dispose();

    System.gc();

    /* following code stops the three time threads i implemented
    Timer.stopTimer(
      VariaveisGlobais.gestorTimers,
      VariaveisGlobais.ENCERRAR_APLICACAO);

    // finaliza o timer do garbage colector
    Timer.stopTimer(
      VariaveisGlobais.gestorTimers,
      VariaveisGlobais.RUN_GARBAGE_COLECTOR);

    Timer.stopTimer(
      VariaveisGlobais.gestorTimers,
      VariaveisGlobais.REFRESCAR_LICENCA);

    try {
      VariaveisGlobais.DataConnection.closeConnection();
    } catch (Exception exc) {
      exc.getMessage();
    }

    VariaveisGlobais.frameLogin.setVisible(true);
    new run();
  }

 I wish all the help i can have.
  Thanks.

                        Ant�nio Jos� Ferreira
Technical Details
Message-ID: <3b1799e5_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!skynet.be!fu-berlin.de!news.boerde.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,868a9197616f32,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-06-01 06:43:49 PST
From: "Ant�nio Ferreira" <antonio.ferreira@artesis.co.pt>
Newsgroups: borland.public.jbuilder.java.api
Subject: Log off the application
Date: Fri, 1 Jun 2001 14:36:42 +0100
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 195.22.4.107
Message-ID: <3b1799e5_1@dnews>
X-Trace: dnews 991402469 195.22.4.107 (1 Jun 2001 06:34:29 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!skynet.be!fu-berlin.de!news.boerde.de!dnews