|
Re: Path Name in Title Bar [message #98985 is a reply to message #98968] |
Thu, 01 September 2005 16:58  |
Eclipse User |
|
|
|
Originally posted by: rkozlowski.solucient.com
//I only know how to do it by typing in the file path first
import java.io.*;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class GetPath {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String strFileName;
File newDirectory=new File("C:\\Practice.txt");
strFileName =newDirectory.getPath();
Display display = new Display ();
Shell shell = new Shell(display);
shell.setText(strFileName);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}}
|
|
|
Powered by
FUDForum. Page generated in 0.07774 seconds