上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 72 下一页
摘要: 2、字符流(通常与缓冲字符流一起使用,提升效率。具体参考4)。直接对字符进行处理,无需字符/字节转换。 3、缓冲字节流 BufferedOutputStream BufferedInputStream 缓冲字节流可以提高效率。字节流可以认为是一个货物一个货物地运输,而缓冲字节流可以把很多货物存放到货 阅读全文
posted @ 2018-08-22 14:17 夕西行 阅读(2169) 评论(0) 推荐(1) 编辑
摘要: 1、文件 2、文件夹 阅读全文
posted @ 2018-08-19 23:43 夕西行 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 【界面说明】 下拉列表框,选谁谁显示。复选框与单选按钮,输出被选与否的状态。知识点主要代码为: 阅读全文
posted @ 2018-08-19 21:41 夕西行 阅读(6440) 评论(0) 推荐(0) 编辑
摘要: Component[] items = 父控件.getComponents(); 获取父控件里的控件,返回Component类的数组。如panel中的许多buttone.getSource() 获取发生Event的对象。 //强制转换为抽象按钮:AbstractButton是JButton、JChe 阅读全文
posted @ 2018-08-19 20:30 夕西行 阅读(1159) 评论(0) 推荐(0) 编辑
摘要: EXIT_ON_CLOSE:结束窗口所在的应用程序。在窗口被关闭的时候会退出JVM。 DISPOSE_ON_CLOSE:隐藏当前窗口,并释放此窗体占有的资源。如果程序没有其他线程在运行,当所有窗口都被dispose后,JVM也会退出。 举例说明:关闭窗体A,窗体B也会退出。关闭窗体B,窗体A不会退出 阅读全文
posted @ 2018-08-17 11:54 夕西行 阅读(4679) 评论(0) 推荐(0) 编辑
摘要: public class Demo extends JFrame { JLabel label;//定义变量,以便在自定义方法类中调用 public Demo() { setBounds(100, 100, 300, 300); setResizable(false); setDefaultCloseOperation(Win... 阅读全文
posted @ 2018-08-16 13:53 夕西行 阅读(406) 评论(0) 推荐(0) 编辑
摘要: public class Demo extends JFrame { private JTextArea textArea; public Demo() { setBounds(100, 100, 470, 300); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); ... 阅读全文
posted @ 2018-08-16 12:59 夕西行 阅读(5790) 评论(1) 推荐(1) 编辑
摘要: 说明:按下实体按键,相应虚拟按键变绿色,释放按键,变白色。 阅读全文
posted @ 2018-08-13 19:14 夕西行 阅读(516) 评论(0) 推荐(0) 编辑
摘要: public class Demo extends JFrame { public Demo() { setBounds(100, 100, 200, 120); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); Container c = getContentPane();... 阅读全文
posted @ 2018-08-11 17:41 夕西行 阅读(762) 评论(0) 推荐(0) 编辑
摘要: 1、文本框JTextField 2、密码框JPasswordField 阅读全文
posted @ 2018-08-11 15:21 夕西行 阅读(2916) 评论(0) 推荐(0) 编辑
上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 72 下一页