Results 1 to 3 of 3
Thread: my awt is not available
- 02-20-2011, 03:43 PM #1
Member
- Join Date
- Nov 2008
- Posts
- 71
- Rep Power
- 0
-
- 02-20-2011, 04:05 PM #3
Member
- Join Date
- Nov 2008
- Posts
- 71
- Rep Power
- 0
no .. u dont need to move it ... the reason why i posted it in swt because im using the swt embedding awt.. actually my program is, i need to open a folder when i hit the button... this folder contains all my files.. its like open you my documents in windows... unfortunately the java.awt.desktop class is not available.. here is my code
Java Code:package webportalcms; import java.io.File; import java.io.IOException; import java.awt.Desktop; import org.eclipse.swt.widgets.Display; //Can be open the uploaded files public class FilesFolder { public FilesFolder(Display display) throws IOException { //File path = new File("bin/files"); // path to the directory to be opened File path = new File("bin/files/"); Desktop desktop = null; if (Desktop.isDesktopSupported()) { desktop = Desktop.getDesktop(); } try { desktop.open(path); } catch (IOException e) { } } }:cool:


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks