Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Lourdes Edwards   on Oct 14 In Java Category.

  
Question Answered By: Landra Schmidt   on Oct 14

Yes i'm using swing in IE VM and Netscape4.7 VM.

in fact, this code  doesn't run too :
public void  init() {
URL lurl;
String path= getDocumentBase().toString() + "hautG.gif";
showStatus("ok : " + path);

try
{

lurl=new URL(path);
ImageIcon ic=new ImageIcon(lurl);

}
catch(MalformedURLException malformedurlexception)
{
showStatus(getCodeBase().toString());
}


JLabel jLabel1 = new JLabel(ic);
jLabel1.setText(path);

this.setSize(new Dimension(400,300));
Container ct=getContentPane();
ct.setLayout(new FlowLayout());
ct.add(jLabel1);

Applet doesn't run into try statement
My label contains the string i want but no pictures.

Are Swing classes responsable ?

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on My first Applet have a problem Or get search suggestion and latest updates.


Tagged: