• 06.07.2025, 20:44
  • S’inscrire
  • Connexion
  • Vous n’êtes pas connecté.

 

Bonjour, visiteur, bienvenue sur les forums Aqua Computer Forum. Si c’est votre première visite, nous vous invitons à consulter l’Aide. Elle vous expliquera le fonctionnement de cette page. Pour avoir accès à toutes les fonctionnalités, vous devez vous inscrire. Pour cela, veuillez utiliser le formulaire d’enregistrement, ou bien lisez plus d’informations sur la procédure d’enregistrement. Si vous êtes déjà enregistré, veuillez vous connecter.

CHECKER

Senior Member

Java Applets - always on top???

jeudi 21 août 2003, 20:54

Hi leuts,

ich verwende Java Plug-in 1.3.1_07
und möchte halt in chats das dieses Java fenster - always on top ist... jedoch finde ich die einstellung dafür nicht...

Bin danke für jede Hilfe...

mfg. checker

Azr@el

Full Member

Re: Java Applets - always on top???

jeudi 21 août 2003, 21:14

falls du code suchst guck ma unter a1javascripts.com
Jabber-ID: |Azrael|@jabber.ccc.org

CHECKER

Senior Member

Re: Java Applets - always on top???

vendredi 22 août 2003, 00:57

nee will eigentlich nur das was da oben steht...

Texx

Full Member

Re: Java Applets - always on top???

vendredi 22 août 2003, 18:53

Entweder so:

Code source

1
2
3
4
5
6
7
8
9
10
11
addWindowListener(new WindowListener(){
      public void windowClosing(WindowEvent e){
            System.exit(0);
      }
      public void windowActivated(WindowEvent e) { }
      public void windowDeactivated(WindowEvent e) { toFront(); }
      public void windowDeiconified(WindowEvent e) { }
      public void windowClosed(WindowEvent e) { }
      public void windowIconified(WindowEvent e) { }
      public void windowOpened(WindowEvent e) { }
});


oder so:

Code source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Call this from class consructor
*/
public void initialize() {
TopThread top = new TopThread();
top.start();
}

/**
* Keep JWindow on top (inner class)
*/
class TopThread extends Thread {
public void run() {
while(true) {
toFront();
/**
* Let 10 milliseconds for other code to execute
*/
try {
Thread.sleep(10);
}
catch(Exception e) {
// Nothing to do
}
}
}
}


Achja, Google hab ich mit : "JWindow always on top" gefüttert und nur die letztere Lösung gefunden. Meine (die obere) funktioniert aber auch ohne Polling ganz gut.

gruß, Texx
We'll never stop living this way!
OSZAR »