java代码简单练习
2024-09-28 11:10:36
总结:
package com.ds;
import java.awt.Color;
import java.awt.FlowLayout; import javax.swing.JFrame;
import javax.swing.JButton; public class gfrd{
static JFrame j=new JFrame("欢迎来到我的新浪微博");
static JButton b=new JButton("登陆");
static JButton b2=new JButton("注册");
static JButton b3=new JButton("重置");
static JButton b4=new JButton("修改");
static JButton b5=new JButton("设置"); public static void main(String[] args) {
j.setBackground(Color.blue);
j.setLayout(new FlowLayout());//所有按钮均可显示
j.add(b);
j.add(b2);
j.add(b3);
j.add(b4);
j.add(b5);
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
j.setBounds(643, 567, 745, 645);
j.setLocationRelativeTo(null);//使窗体居中 显示在屏幕上
j.setVisible(true);
}
}
最新文章
- document.forms用法
- svg绘制圆弧
- SSIS技巧--优化数据流缓存
- .net MVC全球化资源使用心得
- Revit中绘制带坡度管道
- Android开发(二十四)——数据存储SharePreference、SQLite、File、ContentProvider
- hdu-------(1848)Fibonacci again and again(sg函数版的尼姆博弈)
- js缓速运动
- 49. Group Anagrams
- JS中String,Math常用函数
- 在Windows下自动运行Modelsim
- bind函数
- Jenkins SSH timeout
- Putty连接TPYBorad v102 开发板教程
- vue-router.esm.js:1905 TypeError: Cannot convert undefined or null to object
- 【洛谷P3605】晋升者计数
- 网站 HTTP 升级 HTTPS 完全配置手册
- Hadoop思维导图之概述
- ntp时间同步参考
- dubbo系列一、dubbo背景介绍、微服务拆分
热门文章
- 启动/关闭Spring boot服务脚本
- Java语言实现简单FTP软件------>上传下载管理模块的实现(十一)
- Linux开启防火墙后,设置允许通过的端口
- FTP开启被动连接模式
- date_default_timezone_get():
- 编程算法 - 最好牛线(Best Cow Line) 代码(C)
- Swift学习 --- 2.1基础部分
- PAT 天梯赛 L2-010. 排座位 【并查集】
- LRC歌词文件读取代码
- ssh允许root用户登陆