In my even the Application notices the String is a file offer and accordingly calls upon the 'saveFile' method as seen in the code below. The Application then in turn is notified of this. When the ApplicationLayer receives said byte array it parses it back into a string and notifies it's observer that it has done so. I have an application which is using a couple of JFileChooser variables for Open and Save dialogs. The ApplicationLayer is an Observable and the Application is it's Observer. Then it sends the generated byte array through my ApplicationLayer into my Application. The Main thread generates a byte array based on a String I define, Moves the keyboard focus to the first element whose prefix matches the sequence of alphanumeric keys pressed by the user with delay less than value oftimeFactor .
I am using an Application Thread, ApplicationLayer Thread and a 'Main' Thread, And now the problem (where I can’t get rid of): The initial view of the JFileChooser (client) shows all Files of the home directory of the server. The problem I'm having is that both work just fine individually but when I set them up so that the JOptionPane opens the JFileChooser my application deadlocks.ĭoes anyone have an idea what is going wrong here? I tried debugging but haven't found any strange behaviour that would suggest why it would deadlock.ĮDIT: the below sample code seems to work just fine, making me believe that the problem might lie in another thread. JFileChooser gets the RemoteFileSystemView - JFileChooser gets all the RemoteFiles from the server and shows folders as well as files in the JFileChooser. The idea is that when my application is offered a file through the network, the user receives a JOptionPane asking if he or she wants to accept said file offer, in the event their answer is yes I want to open a JFileChooser so they can browse to the location where they want to save the file. The idea is that when my application is offered a file through the network, the user receives a JOptionPane asking if he or she wants to accept said file offer, in the event their answer is yes I want to open a JFileChooser so they can. I'm trying to make a file transfer notification using Swing. I'm trying to make a file transfer notification using Swing. Swing chaining JOptionPane into JFileChooser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |