| | |
JFileChooser timeout / thread problems
![]() |
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Solved Threads: 0
Hi
Can someone help me, I have been trying to fix this for a while without any luck. I am new to JAVA programming though I have coded in many languages.
What I am trying to do is use the JFileChooser class in a Windows 2000 environment, the user can type the full path of a file into the File Name field and the directory is displayed. If I type a host name e.g. \\HOSTNAME returns HOSTNAME in the File Name field and the File view does not change (compare this to Explorer and you would see the sharenames). If I then type in a Host and share name (\\HOSTNAME\ShareName) I get a folder contents. This is just a little annoying but work aroundable by typing \\HOSTNAME\ShareName and navigating upwards.
The real problem occurs when the sharename is mis-spelt. I work in a large organisation and have access to many Hosts, typing a wrong file path can take several minutes for the application to timeout before I can change it. Explorer does not hang but allows you to correct the path and try again. Warning the user later that he had mis-typed.
Does anyone know how to thread the File Name text box to stop this??
Thanks in Advance
Craig
Can someone help me, I have been trying to fix this for a while without any luck. I am new to JAVA programming though I have coded in many languages.
What I am trying to do is use the JFileChooser class in a Windows 2000 environment, the user can type the full path of a file into the File Name field and the directory is displayed. If I type a host name e.g. \\HOSTNAME returns HOSTNAME in the File Name field and the File view does not change (compare this to Explorer and you would see the sharenames). If I then type in a Host and share name (\\HOSTNAME\ShareName) I get a folder contents. This is just a little annoying but work aroundable by typing \\HOSTNAME\ShareName and navigating upwards.
The real problem occurs when the sharename is mis-spelt. I work in a large organisation and have access to many Hosts, typing a wrong file path can take several minutes for the application to timeout before I can change it. Explorer does not hang but allows you to correct the path and try again. Warning the user later that he had mis-typed.
Does anyone know how to thread the File Name text box to stop this??
Thanks in Advance
Craig
Well, the verification is occurring in BasicFileChooserUI.ApproveSelectionAction. If it's really worth it to you, you might be able to extend the necessary classes to provide an interruptible threaded implementation, but it might get stickier than you expect.
I don't know all of your requirements, but it might be more straightforward to just create your own file browser to provide the functionality you need.
I don't know all of your requirements, but it might be more straightforward to just create your own file browser to provide the functionality you need.
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Solved Threads: 0
I was hoping that I could just thread the File Name text box or really updating of the File Folder List. Pressing enter in the text box would set the update going, if a key is then pressed in the text box I want the update thread to be killed with only a new thread starting once the enter key is again pressed.
As my Java knowledge is limited made me think that by using the JFileChooser class would be a quick way to get my application moving, it seems as I have now spent many hours on this the way forward may be as you say to create my own class.
Thanks anyway
As my Java knowledge is limited made me think that by using the JFileChooser class would be a quick way to get my application moving, it seems as I have now spent many hours on this the way forward may be as you say to create my own class.
Thanks anyway
•
•
•
•
I was hoping that I could just thread the File Name text box or really updating of the File Folder List. Pressing enter in the text box would set the update going, if a key is then pressed in the text box I want the update thread to be killed with only a new thread starting once the enter key is again pressed.
It wouldn't hurt anything to give it a try if you really wanted to dig into it - you may get it just right! If you are fairly inexperienced with Swing and threading in Java though, it could be a pretty daunting jump into the deep end.
![]() |
Similar Threads
- problems getting past the router (Networking Hardware Configuration)
- SYSTEM.INI missing on WIN 98 SE (Windows 95 / 98 / Me)
- Help need with Socket, Thread, and BufferedReader (Java)
- Internet Explorer will not download (Web Browsers)
- A special welcome, just for you! (Community Introductions)
- unable to start windows (Windows NT / 2000 / XP)
- About SpywareBlaster (Viruses, Spyware and other Nasties)
- Removed 2020 Search - problems still there: Hijackthis log included (Viruses, Spyware and other Nasties)
- CWShredder problems (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: Need help with binarysearch.
- Next Thread: Help Java error message: cannot find symbol
| Thread Tools | Search this Thread |
account android api applet application array arrays automation awt bidirectional binary birt bluetooth busy_handler(null) chat class classes client code columns component database designadrawingapplicationusingjavajslider draw eclipse error errors exception expand fractal game givemetehcodez graphics gui guidancer homework html ide image inetaddress inheritance input integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield julia linux list loop map method methods midlethttpconnection mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source plazmic print problem program programming project property recursion ria scanner search server set smart sms smsspam sort sourcelabs splash sql sqlite static string subclass support swing testautomation threads tree webservices windows






