| 网站首页 | JAVA文章 | AppServers | Web开发 | 应用开发 | 资源下载 |
    想学好编程,学好外语很重要  [enadd  2006年12月25日]        
设为首页 加入收藏 联系站长
您现在的位置: 编程笔记网 >> JAVA文章 >> JAVA实例 >> 文章正文
JAVA类RandomAccessFile应用的一个实例        【字体:
JAVA类RandomAccessFile应用的一个实例
作者:-    文章来源:-    点击数:    更新时间:2006-7-18

import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.io.RandomAccessFile;
import java.io.IOException;


public class RandomAccessFileTest extends JFrame implements ActionListener{

    String dir;

    JTextArea textArea;

 

     public RandomAccessFileTest(){

        super("RandomAccessFileTest");

        addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){

        System.exit(0);

        }});


        textArea=new JTextArea();

        textArea.setEditable(false);

        JScrollPane scrollPane=new JScrollPane(textArea);

        this.getContentPane().add("Center",scrollPane);


        JPanel panel=new JPanel();

        panel.setLayout(new FlowLayout(FlowLayout.RIGHT,10,5));

        this.getContentPane().add(panel,"South");

        JButton open= new JButton("打开");

        JButton close= new JButton("关闭");


        open.addActionListener(this);

        open.setActionCommand("open");

        close.addActionListener(this);

        close.setActionCommand("close");

[1] [2] [3] 下一页  

文章录入:enadd    责任编辑:enadd 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
  • JROCKIT 5.0优化内存方法

  • java时间函数

  • JDBC中获取数据表的信息

  • JDBC 4.0规范之目标

  • JAVA操作数据库方式与设计模…

  • 提升JSP应用程序的七大绝招

  • 用Java3D 做的3D粒子特效

  • 使用RandomAccessFile读写一…

  • IP地址封装对象应用实例

  • PushbackInputStream流使用实…

  •   网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 管理登录 |