• Post Reply Bookmark Topic Watch Topic
  • New Topic

Icons not visible in applet  RSS feed

 
dani abdallah
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

I have a created a JTree where every node has an icon. One class is that extends JPanel is being used for the tree, and everything works fine and the icons show correctly. However, when I create an instance of that class and add it to my Applet(which contains several other components), the icons are not visible.

Anyone has any idea why?

Any suggestions will be appreciated.

Regards,

Dani
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> ... Applet... the icons are not visible.

google

getCodeBase()
 
dani abdallah
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn wrote:> ... Applet... the icons are not visible.

google

getCodeBase()


Thank you for your assistant. However I am still confused on how to use this. Are you assuming I need a reference to the icon so that I can use it directly in the applet?

If so, that is not the case(sorry i didn't explain everything so clearly at first) I am creating an instance of the JTreeComponent class that extends JPanel in MAIN class that also extends JPanel and that includes instances of all the other components I have created. This mainGUI is presented in an applet. When I run the JTreeComponent class separately I see the JTree with icons etc as i should, however when I run my applet (which creates a mainGUI instance) I cannot see the icon.

Apologies for the confusion, or maybe I am still missing something?

Regards,

Dani
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for an applet the icons need to be read via a URL

find some applet sample code that uses getCodeBase() to understand
 
dani abdallah
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn wrote:for an applet the icons need to be read via a URL

find some applet sample code that uses getCodeBase() to understand


Thanks, I see the problem, appreciate your assistance.

Regards,

Dani
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!