Je n'arrive pas à faire d'interface graphique d'un programme java avec netbeans, voici ce que me réponds netBeans lorsque je lui demande d'executer un programme on ne peut plus limité :
"init:
deps-jar:
Created dir: C:\Documents and Settings\amir\Minimum\build\classes
Compiling 1 source file to C:\Documents and Settings\amir\Minimum\build\classes
Note: C:\Documents and Settings\amir\Minimum\src\minimum\Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
compile-single:
run-single:
java.lang.NoClassDefFoundError: minimum/Main
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 9 seconds)"
et voici le code
Quelqu'un saurait t'il m'aider?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 /* * Main.java * * Created on 11 juin 2005, 16:44 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ import javax.swing.*; /** * * @author amir */ public class Main extends JFrame{ /** Creates a new instance of Main */ public Main() { JPanel panneau=new JPanel(); JButton but=new JButton("quit"); panneau.add(but); setContentPane(panneau); setDefaultCloseOperation(EXIT_ON_CLOSE); setTitle("début catastrophique"); setSize(350,350); } /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Main yoMec=new Main(); yoMec.show(); } }
Partager