DEV/BUT1/DEV2.1/TP8-Évènements/EXO2/Attente.java

28 lines
785 B
Java
Raw Normal View History

2024-03-05 12:52:55 +01:00
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Fond Attente ActionListener {
static JPanel panneau;
public static void main(String[] args) {
JFrame fenetre = new JFrame("Fond");
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.setSize(500, 500);
JPanel panneau = new JPanel();
fenetre.add(panneau);
fenetre.setVisible(true);
}
}
try {
int n = Integer.parseInt(args[0]);
System.out.println("En hexadecimal" + Integer.toHexString(n));
}catch(NumberFormatException e){
System.err.println("Ceci n'est pas un" + "entier !");
} catch(ArrayIndexOutOfBoundsException e){
System.err.println("Il faut un argument :");
}