Java swing comment afficher un jpanel
Résolu
layeures
Messages postés
310
Statut
Membre
-
layeures Messages postés 310 Statut Membre -
layeures Messages postés 310 Statut Membre -
Bonjour,
comment faire pour afficher une fenetre apres un clic sur un bouton
voici ce que j ai essayer de faire et qui ne marche pas
interfanceun.java
panel.java
merci de votre aide
comment faire pour afficher une fenetre apres un clic sur un bouton
voici ce que j ai essayer de faire et qui ne marche pas
interfanceun.java
private void boutonunActionPerformed(java.awt.event.ActionEvent evt) {
panel test = new panel();
// TODO add your handling code here:
}
panel.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* panel.java
*
* Created on 9 sept. 2010, 09:45:42
*/
package intro;
/**
*
* @author sofiene
*/
public class panel extends javax.swing.JPanel {
/** Creates new form panel */
public panel() {
setVisible(true);
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
}// </editor-fold>
// Variables declaration - do not modify
// End of variables declaration
}
merci de votre aide
A voir également:
- Java swing comment afficher un jpanel
- Jeux java itel - Télécharger - Jeux vidéo
- Waptrick java football - Télécharger - Jeux vidéo
- Waptrick java voiture - Télécharger - Jeux vidéo
- Eclipse java - Télécharger - Langages
- Java apk - Télécharger - Langages