Created
May 26, 2016 14:35
-
-
Save anymaniax/38a91a3db841c552b9fcc0efc5fb5e43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FrmFenetre extends JFrame{ | |
public frmFenetre (){ | |
JPanel pnlPanneau=new JPanel () ; | |
this.setDefaultCloseOperation ( JFrame.EXIT_ON_CLOSE ) ; | |
this.setContentPane ( pnlPanneau ) ; | |
this.setSize (300 ,200) ; | |
this.setTitle("Exemple 1"); | |
JButton btnBoutonR=new JButton("Rouge") ; | |
JLabel lblCouleur=new JLabel () ; | |
btnBoutonR.addActionListener(new CouleurAction(lblCouleur)); <≠≠ (⇤) | |
pnlPanneau.add(btnBoutonR) ; | |
pnlPanneau.add(lblCouleur) ; | |
} | |
public static void main(String [] args) { | |
FrmFenetre maFenetre = new FrmFenetre() ; | |
maFenetre . s e t V i s i b l e ( true ) ; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment