|
begin process at 2008 08 22 02:07:41
Derniers logiciels
|
Trouver une ressource (Nouvelle version du moteur, plus rapide & pertinent, essayez le !)
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
Sujet : Problème bizarre JApplet (jre 1.5.06) [ Archives / Applet ] (aurel16v)
|
Problème bizarre JApplet (jre 1.5.06)
le 12/05/2006 10:28:03

aurel16v
|
Salut à tous! Je suis en train de développer une tite interface graphique avec un JApplet. Le problème, c'est que quand je teste, j'ai une erreur qui apparait dans ma console: Java Plug-in 1.5.0_06 Utilisation de la version JRE 1.5.0_06 Java HotSpot(TM) Client VM Répertoire d'accueil de l'utilisateur = C:\... java.net.UnknownHostException: www at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.getJSFileFromURL(Unknown Source) at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source) at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source) at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source) at sun.plugin.AppletViewer.initEnvironment(Unknown Source) at sun.plugin.AppletViewer.initEnvironment(Unknown Source)
je ne comprend pas du tout d'où ça peut provenir!!! Pour info, la maquette de mon code: (qui peu peut être aider certains) import java.awt.*; import javax.swing.*; import java.net.URL; import java.net.MalformedURLException; import java.awt.event.*;
public class HelloWorldApplet extends JApplet { private Swing02 internalFrame,internalFrame2,internalFrame3; private FicheDescriptive fiche; private FenetreConteneur desktopPane; private Carte carte;
public void init() { int x = this.getWidth(); int y = this.getHeight(); carte = new Carte(); carte.setSize(x,y); desktopPane = new FenetreConteneur(); desktopPane.add(carte); internalFrame = new Swing02("Légende",carte); internalFrame2 = new Swing02("Outils de navigation",carte); internalFrame3 = new Swing02("Données",carte); this.setVisible(true); internalFrame2.setSize(new Dimension(x*30/100,y*10/100)); internalFrame2.setPreferredSize(new Dimension(x*30/100,y*10/100)); internalFrame2.setLocation(x*70/100,0); internalFrame.setSize(new Dimension(x*30/100,y*45/100)); internalFrame.setPreferredSize(new Dimension(x*30/100,y*45/100)); internalFrame.setLocation(x*70/100,y*10/100); internalFrame.c.add(new JTree(), BorderLayout.NORTH);
internalFrame3.setSize(new Dimension(x*30/100,y*35/100)); internalFrame3.setPreferredSize(new Dimension(x*30/100,y*35/100)); internalFrame3.setLocation(x*70/100,y*55/100); fiche = new FicheDescriptive(); internalFrame3.add(fiche); desktopPane.add(internalFrame3); desktopPane.add(internalFrame2); desktopPane.add(internalFrame); desktopPane.setBounds(0,0,x,y); this.getContentPane().add(desktopPane);
desktopPane.setComponentZOrder(carte,1); desktopPane.setComponentZOrder(internalFrame,2); desktopPane.setComponentZOrder(internalFrame2,2); desktopPane.setComponentZOrder(internalFrame3,2);
super.repaint(); desktopPane.repaint(); desktopPane.setLayer(carte,JLayeredPane.DEFAULT_LAYER + 1); desktopPane.setLayer(internalFrame,JLayeredPane.DEFAULT_LAYER + 2); desktopPane.setLayer(internalFrame2,JLayeredPane.DEFAULT_LAYER + 2); desktopPane.setLayer(internalFrame3,JLayeredPane.DEFAULT_LAYER + 2); } public HelloWorldApplet(){ this.init(); } }
/** * * @author Mr Veron */ import javax.swing.*; import java.awt.event.*; import java.awt.*;
public class Swing02 extends JInternalFrame implements ActionListener{ private String titre; private Carte carte; public Container c = getContentPane(); private JButton bouton1; public Swing02(String nom, Carte c) { this.setTitle(nom); this.carte = c; this.setIconifiable(true); this.setResizable(true); this.setVisible(true); this.setAutoscrolls(false); bouton1 = new JButton("BLEU"); bouton1.addActionListener(this); this.add(bouton1); } public void paint(){ } public void actionPerformed(ActionEvent e){ if (e.getSource() == bouton1) { if(carte.getBackground() != Color.BLUE)carte.setBackground(Color.BLUE); } } }
import java.awt.*; import java.awt.event.*; import javax.swing.*;
/** * * @author Mr Veron Aurélien */ public class FicheDescriptive extends JScrollPane { class Formulaire extends JPanel { Formulaire(){ JTextField text = new JTextField("C'est le grand méchant loup"); JLabel label = new JLabel("essai"); JTextField text1 = new JTextField("C'est le grand méchant loup"); JLabel label1 = new JLabel("essai"); JTextField text2 = new JTextField("C'est le grand méchant loup"); JLabel label2 = new JLabel("essai"); this.add(label2); this.add(text2); this.add(label1); this.add(text1); this.add(label); this.add(text);
this.setAutoscrolls(false); this.setVisible(true); } } /** Creates a new instance of FicheDescriptive */ public FicheDescriptive() { Formulaire formulaire = new Formulaire(); this.setViewportView(formulaire); this.setBorder( BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder() , "Fiche descriptive" ) ); this.setVisible(true); } }
import java.awt.*; import javax.swing.*; /** * * @author Mr Veron */ public class FenetreConteneur extends JDesktopPane { public FenetreConteneur() { this.setVisible(true); } }
import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author Mr Veron */ public class Carte extends JPanel implements ActionListener { private JButton bouton; /** Creates a new instance of Carte */ public Carte() { this.setBackground(Color.green); JLabel label = new JLabel("Coucou c'est moi"); bouton = new JButton("Autre Couleur!"); this.add(label); this.add(bouton); bouton.addActionListener(this); this.setVisible(true); this.setEnabled(false); } public void actionPerformed(ActionEvent e){ if (e.getSource() == bouton) { if(this.getBackground() == Color.green)this.setBackground(Color.RED); else this.setBackground(Color.GREEN); } } }
PPLLLLEEEEAAAAASSEEEE HELP! 
|
|
|
Classé sous : net, source, carte, at, unknown
|
CalendriCode
| | | L | M | M | J | V | S | D |
| | | | | 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 |
|
Téléchargements
Logiciels à télécharger sur le même thème :
|
|