Forums Register Login

Icons not visible in applet

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
> ... Applet... the icons are not visible.

google

getCodeBase()
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
for an applet the icons need to be read via a URL

find some applet sample code that uses getCodeBase() to understand
+Pie Number of slices to send: Send
 

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
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 973 times.
Similar Threads
Display File Icon on mac OSx
Applet components visible
running a class a particular number of times
Getting the users directory path
Blinking effect not visible when loading the applet thr' the browser.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:54:41.