import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;
/**
* Java1.6.0实现调用操作平台桌面系统
* Desktop类将获得操作平台的桌面系统,以便使用系统默认浏览器、编辑器、邮件、打印等
* 一堆按钮摆在一起不大好看,懒的布局了,大家能看明白就成,打开文件、编辑文件和打印文件需要先按“浏览”按钮,选择一个文件后才行。
*
* @author 五斗米 <如转载请保留作者和出处>
* @blog http://blog.csdn.net/mq612
*/
public class DesktopDemo extends JFrame {
private JPanel pane = null;
private JLabel label = null; // 显示信息的标签
private JButton [] button = null; // 启动平台默认程序的按钮
private Desktop desktop = null; // 本操作平台的桌面系统实例
private JTextField text = null; // 显示文件地址的TextField
private JButton b = null; // 浏览文件的按钮
private JFileChooser fc = null; // 需要浏览文件
private File file = null; // 文件
public DesktopDemo() {
super("