Recherche automatique java
yuri648
Messages postés
677
Date d'inscription
Statut
Membre
Dernière intervention
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
je suis en train de faire une rechercha automatique lors de la saisie dans un JtextField java
lors de la sais il lui affichra une petite fenetre de proposition par exemple il saisie le caractere "s" iol lui affiche touts les mots qui commence avec "s" ,le probleme kel composant SWING utilisé pour afficher la petite fentre de proposition?????
merci
je suis en train de faire une rechercha automatique lors de la saisie dans un JtextField java
lors de la sais il lui affichra une petite fenetre de proposition par exemple il saisie le caractere "s" iol lui affiche touts les mots qui commence avec "s" ,le probleme kel composant SWING utilisé pour afficher la petite fentre de proposition?????
merci
A voir également:
- Recherche automatique java
- Recherche automatique des chaînes ne fonctionne pas - Guide
- Jeux java itel - Télécharger - Jeux vidéo
- Waptrick java football - Télécharger - Jeux vidéo
- Réponse automatique thunderbird - Guide
- Logiciel de sauvegarde automatique gratuit - Guide
5 réponses
je l'ai essayé avec Jcombobox editable j'ai pas pu recuperer le text ecrit de dans au meme temps avec keytyped
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JComboBox;
import java.awt.Rectangle;
public class c extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JComboBox jComboBox = null;
/**
* This method initializes jComboBox
*
* @return javax.swing.JComboBox
*/
private JComboBox getJComboBox() {
if (jComboBox == null) {
jComboBox = new JComboBox();
jComboBox.setBounds(new Rectangle(36, 53, 168, 26));
jComboBox.setEnabled(true);
jComboBox.setEditable(true);
jComboBox.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent e) {
System.out.println("keyTyped()"); // TODO Auto-generated Event stub keyTyped()
}
});
}
return jComboBox;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
SwingUtilities.invokeLater(new Runnable() {
public void run() {
c thisClass = new c();
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
thisClass.setVisible(true);
}
});
}
/**
* This is the default constructor
*/
public c() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
this.setTitle("JFrame");
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJComboBox(), null);
}
return jContentPane;
}
}
normalement quand j'ecrit sur le combobox elle m'affichera keytaped dans la console si j'arrive a sa c bon
et merci de m'avoir repondre
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JComboBox;
import java.awt.Rectangle;
public class c extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JComboBox jComboBox = null;
/**
* This method initializes jComboBox
*
* @return javax.swing.JComboBox
*/
private JComboBox getJComboBox() {
if (jComboBox == null) {
jComboBox = new JComboBox();
jComboBox.setBounds(new Rectangle(36, 53, 168, 26));
jComboBox.setEnabled(true);
jComboBox.setEditable(true);
jComboBox.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent e) {
System.out.println("keyTyped()"); // TODO Auto-generated Event stub keyTyped()
}
});
}
return jComboBox;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
SwingUtilities.invokeLater(new Runnable() {
public void run() {
c thisClass = new c();
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
thisClass.setVisible(true);
}
});
}
/**
* This is the default constructor
*/
public c() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
this.setTitle("JFrame");
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJComboBox(), null);
}
return jContentPane;
}
}
normalement quand j'ecrit sur le combobox elle m'affichera keytaped dans la console si j'arrive a sa c bon
et merci de m'avoir repondre
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question