Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet wont load...

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator





after i use the <applet></applet> tags in html this applet wont display
the circles and SHA..

why not?


Thanks,

Justin

p.s i have a CircleListener as you can see, but its commented out cause it creates a second class. in the applet code, how do i set the code value equal to more than one class file?
 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like it ought to display something. Are you sure its the applet thats the problem, or is it possible that the applet isn't loading at all.

i.e., is the button being displayed?

- Adam
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i have another applet that is just a big JScrollPane, and that displays. But this one won't, im stuck.

Justin Fox
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the paint method being called?
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you dont have to call it in the init() do you? i never do in any other applications...


Justin Fox
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, your code doesn't have to call it, because someone does, and that's not going to happen when using Swing (as JApplet does). Swing wants you to use the paintComponent method instead. Have your previous applets possibly all been based on Applet (as opposed to JApplet)?
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
umm it works now, i updated my java plugin stuff for my browser.
but i have to use paint() in JApplet, it doesnt recognize paintComponent when you're using JApplet, only if you use JPanel.

Justin
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic