08 2022 档案

io流查看文件名和路径以及查看目录中内容
摘要: 阅读全文

posted @ 2022-08-25 04:09 大风吹过12138 阅读(24) 评论(0) 推荐(0) 编辑

io流删除文件以及判断资源是否为文件
摘要: 阅读全文

posted @ 2022-08-25 02:17 大风吹过12138 阅读(11) 评论(0) 推荐(0) 编辑

io流重命名文件
摘要:剪切,重命名,文件换目录 阅读全文

posted @ 2022-08-25 02:07 大风吹过12138 阅读(10) 评论(0) 推荐(0) 编辑

io流创建空文件
摘要:1 public class FileDemo01 { 2 public static void main(String[] args) throws IOException { 3 File file=new File("D:/guoguo/jiang.txt"); 4 Boolean mkdir 阅读全文

posted @ 2022-08-25 01:57 大风吹过12138 阅读(22) 评论(0) 推荐(0) 编辑

File创建新文件夹
摘要:mkDirs()方法,只能操作文件夹 1 public class FileDemo01 { 2 public static void main(String[] args) { 3 File file=new File("D:/guoguo"); 4 Boolean mkdir=file.mkdi 阅读全文

posted @ 2022-08-24 23:07 大风吹过12138 阅读(150) 评论(0) 推荐(0) 编辑

file类介绍
摘要:构造方法 阅读全文

posted @ 2022-08-22 22:28 大风吹过12138 阅读(12) 评论(0) 推荐(0) 编辑

端口号
摘要: 阅读全文

posted @ 2022-08-16 16:30 大风吹过12138 阅读(7) 评论(0) 推荐(0) 编辑

ip地址
摘要:网络编程3要素:ip 端口号 协议 ping 加上一个IP地址,如果能ping通,就代表你的电脑以和这台电脑进行数据交换 ping 127.0.0.1以及localhost都代表本机的IP地址 阅读全文

posted @ 2022-08-16 16:06 大风吹过12138 阅读(124) 评论(0) 推荐(0) 编辑

网络通信协议分类
摘要:UDP:无连接传输协议 成本小 TCP:传输控制协议 阅读全文

posted @ 2022-08-16 15:54 大风吹过12138 阅读(116) 评论(0) 推荐(0) 编辑

下拉框,列表框
摘要:下拉框 列表框 阅读全文

posted @ 2022-08-07 18:50 大风吹过12138 阅读(38) 评论(0) 推荐(0) 编辑

图片按钮,多选框,单选框
摘要:public class JButtonDemo01 extends JFrame{ public JButtonDemo01(){ Container contentPane = this.getContentPane(); URL url=JButtonDemo01.class.getResou 阅读全文

posted @ 2022-08-07 18:27 大风吹过12138 阅读(20) 评论(0) 推荐(0) 编辑

文本域JScroll面板
摘要:1 public class JScrollDemo extends JFrame { 2 public JScrollDemo(){ 3 Container container = getContentPane(); 4 JTextArea jTextArea=new JTextArea(20,4 阅读全文

posted @ 2022-08-07 16:11 大风吹过12138 阅读(19) 评论(0) 推荐(0) 编辑

Icon,ImageIcon标签
摘要:1 public class IconDemo extends JFrame implements Icon { 2 int width; 3 int height; 4 public IconDemo(){ 5 } 6 public IconDemo(int width,int height){ 阅读全文

posted @ 2022-08-07 04:03 大风吹过12138 阅读(244) 评论(0) 推荐(0) 编辑

JDialog弹窗
摘要:public class DialogDemo extends JFrame { public DialogDemo(){ setVisible(true); setBounds(300,300,400,500); Container container= this.getContentPane() 阅读全文

posted @ 2022-08-06 18:08 大风吹过12138 阅读(50) 评论(0) 推荐(0) 编辑

Swing之JFrame窗体
摘要:1 public class JFrameDemo extends JFrame{ 2 public void init() { 3 JFrame jf = new JFrame("guoguoguo"); 4 //获得一个容器 5 Container container= jf.getConten 阅读全文

posted @ 2022-08-05 23:51 大风吹过12138 阅读(7) 评论(0) 推荐(0) 编辑

键盘监听事件
摘要:public class demo01 { public static void main(String[] args) { new KeyFrame("hahhahhs"); } } class KeyFrame extends Frame{ public KeyFrame(String titl 阅读全文

posted @ 2022-08-05 17:55 大风吹过12138 阅读(23) 评论(0) 推荐(0) 编辑

窗口监听事件
摘要:匿名内部类 public class demo01 { public static void main(String[] args) { new MyFrame("hahhahhs"); } } class MyFrame extends Frame{ public MyFrame(String t 阅读全文

posted @ 2022-08-05 17:36 大风吹过12138 阅读(20) 评论(0) 推荐(0) 编辑

鼠标监听事件,模拟画图工具
摘要:1 public class TestMouseListener { 2 public static void main(String[] args) { 3 new MyFrame01("鼠标监听事件"); 4 } 5 } 6 class MyFrame01 extends Frame{ 7 Ar 阅读全文

posted @ 2022-08-05 15:37 大风吹过12138 阅读(23) 评论(0) 推荐(0) 编辑

画笔
摘要: 阅读全文

posted @ 2022-08-05 00:23 大风吹过12138 阅读(58) 评论(0) 推荐(0) 编辑

简易计算器
摘要:组合 面向过程 public class TestCalc { public static void main(String[] args) { new Calculate(); } } class Calculate extends Frame{ public Calculate(){ TextF 阅读全文

posted @ 2022-08-04 01:14 大风吹过12138 阅读(60) 评论(0) 推荐(0) 编辑

输入框事件监听
摘要:e.getText返回的是一个Object对象,向下转型成TextField类的对象 public class TestText01 { public static void main(String[] args) { new MyFrame(); } } class MyFrame extends 阅读全文

posted @ 2022-08-03 22:06 大风吹过12138 阅读(30) 评论(0) 推荐(0) 编辑

事件监听
摘要:public class demo06 { public static void main(String[] args) { Frame frame = new Frame(); Button button = new Button("hahahhaha"); frame.add(button); 阅读全文

posted @ 2022-08-03 17:40 大风吹过12138 阅读(21) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示