Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet with JFilechooser called from a Javascript blocks paint messages to Browser

 
zapata zane
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to create an applet that can:

1) be called from a Javascript
2) displays a file selection dialog for multi-selecting files
3) returns the selected filenames in a string to the JavaScript
I am able to use doPrivileged to apply the necessary security context to launch a JFilechooser and return the filenames selected. However, When the JFilechooser dialog is visible and the user moves the dialog window around the HTML pages dose not receive any repaint messages. They seem to be blocked by the thread that launched the JFilechooser dialog and is probably blocking update events as the dialog is still visible.

I know I need some type of a message pump so the child thread can inform the parent thread and the browser to repaint. However, I don't know how to do this.

Please help.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic