slt
jai créé un eptite applet sur netbeans 5.5, je compile ca execute avc le applet viwer tranquil, mais en externe il me retourne
au fait jutilise l'html qui me genere ds le dossier build:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
il n'y a qu'1 maleureux bouton lol
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 <HTML> <HEAD> <TITLE>Applet HTML Page</TITLE> </HEAD> <BODY> <!-- *** GENERATED applet HTML launcher - DO NOT EDIT IN 'BUILD' FOLDER *** If you need to modify this HTML launcher file (e.g., to add applet parameters), copy it to where your applet class is found in the SRC folder. If you do this, the IDE will use it when you run or debug the applet. Tip: To exclude an HTML launcher from the JAR file, use exclusion filters in the Packaging page in the Project Properties dialog. For more information see the online help. --> <H3><HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%"></H3> <P> <APPLET codebase="classes" code="foo/Foo.class" width=350 height=200></APPLET> </P> <HR WIDTH="100%"><FONT SIZE=-1><I>Generated by NetBeans IDE</I></FONT> </BODY> </HTML>
j'ai eu un probleme similaire sur jbuilder il lui fallait des jars ...
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66 /* * Foo.java * * Created on 22 février 2007, 06:07 */ package foo; import org.jdesktop.layout.GroupLayout; /** * * @author nounours */ public class Foo extends javax.swing.JApplet { /** Initializes the applet Foo */ public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } } /** This method is called from within the init() method to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code "> private void initComponents() { jButton1 = new javax.swing.JButton(); jButton1.setText("jButton1"); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(19, 19, 19) .add(jButton1) .addContainerGap(45, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(30, 30, 30) .add(jButton1) .addContainerGap(55, Short.MAX_VALUE)) ); }// </editor-fold> // Variables declaration - do not modify private javax.swing.JButton jButton1; // End of variables declaration }
merci de checker
Partager