This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes I/O and Streams and the fly likes how Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how" Watch "how" New topic


Ravi mca

Joined: Mar 14, 2009
Posts: 4
how to move a file from one drive to another using java swing. tell me!.........
Ravi mca

Joined: Mar 14, 2009
Posts: 4
try it with this,

public FileChooserDemo() {
UIManager.LookAndFeelInfo[] installedLafs = UIManager.getInstalledLookAndFeels();
for (UIManager.LookAndFeelInfo lafInfo : installedLafs) {
try {
Class lnfClass = Class.forName(lafInfo.getClassName());
LookAndFeel laf = (LookAndFeel) (lnfClass.newInstance());
if (laf.isSupportedLookAndFeel()) {
String name = lafInfo.getName();
supportedLaFs.add(new SupportedLaF(name, laf));
} catch (Exception e) { // If ANYTHING weird happens, don't add it
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Look at the java.util.File API.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61092

Firstly, please take the time to choose the correct forum for your posts. This forum is for questions on XYZ. For more information, please read this. This post has been moved to a more appropriate forum.

Also, please be sure to take the time to compose descriptive subjects for your posts; read this for more information. A title such as "how" is not helpful. What would happen if all posts had such a title?

Please go back and change your post to add a more meaningful subject by clicking the button on your post.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: how