28 lines
785 B
Java
28 lines
785 B
Java
|
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 :");
|
||
|
}
|