Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet is not painting its contents

 
Wai Meng Ng
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a following problem. I have included a JTable inside a JScrollPabe in an applet.
However when the web page loads. There is nothing shown. When I tried 'refreshing' the page several times in quick succession , occasionally the contents is shown. What coule be the problem?
Another issue is when I switch to another application, the contents disappear again. How can i fix the contents without it disapperaing when the web page is minimised or has lost focus?
Below is the code for my applet.

Thank alot!
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing to know (if you didn't already) is that Swing isn't part of the Java runtimes for IE or Netscape. They use a very antique version of Java that predates Swing, so to run a Swing-based applet you'd need to have the Java Plug-In (available from java.sun.com) installed on each client's machine.
I'm not sure if you need that paint() declaration since you're using Swing rather than drawing things yourself, but I'm just guessing there.
 
Timothy Chen Allen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had something like this happen on my Windows machine. I had to go to display properties and decrease Hardware Acceleration

I ended up leaving this at the next to lowest setting. Now all my Applets and apps look fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic