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

Updation of Applet using Swing

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created an applet using java swing components.The applet loads fine but the updation is not proper. When the panels in the applet are supposed to change they are not changing until we do some updation in the applet(like moving the applet manually etc). I think this is some refresh or threading problem.Can anyone help....
Thanks in advance
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Annapurna B",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the revalidate() method on the JApplet, or use:
invalidate();
validate();
[This message has been edited by Daniel Searson (edited May 26, 2001).]
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are u extending from JApplet?
Make sure u instanciate and construct most of ur UI in the init() method itself.
Delete browser cache. Browser settings will have to be javaenabled.
Also revalidate() should preceed repaint().

Originally posted by Annapurna B:
I have created an applet using java swing components.The applet loads fine but the updation is not proper. When the panels in the applet are supposed to change they are not changing until we do some updation in the applet(like moving the applet manually etc). I think this is some refresh or threading problem.Can anyone help....
Thanks in advance


 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic