9.Java图形用户界面设计说明书.ppt

import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.filechooser.*; public class JFileChooserDemo extends JFrame { public JFileChooserDemo() { super(使用JFileChooser); final JTextArea ta = new JTextArea(5,20); ta.setMargin(new Insets(5,5,5,5)); ta.setEditable(false); JScrollPane sp = new JScrollPane(ta); final JFileChooser fc = new JFileChooser(); JButton openBtn = new JButton(打开文件...); openBtn.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { int returnVal = fc.showOpenDialog(

文档评论(0)

1亿VIP精品文档

相关文档