用AWT写的登陆界面

我应该怎样做我的DBMS??

学完了数据库课程设计,老师让设计自己的DBMS,实在是没思路啊,打算用java写,弄了一节课就弄出来了一个极其丑陋的登陆界面,存下来

                                                                   

--------------------------把代码存下来-------------------------------

package com.john.display;
import java.awt.*;

import javax.swing.JLabel;

public class Login {
	private Frame frame;
	private Panel mainer;
	private Panel bottomer;
	private Panel uper;
	private Panel downer;
	public void init(){
		frame = new Frame("登陆");
		mainer = new Panel(new BorderLayout());
		uper = new Panel(new FlowLayout(FlowLayout.CENTER,5,3));
		downer = new Panel(new FlowLayout(FlowLayout.CENTER, 5,3));
		bottomer = new Panel(new FlowLayout(FlowLayout.CENTER, 5, 3));
		
		
		JLabel yonghuming = new JLabel("用户名:");
		TextField yonghumingi = new TextField(15);
		uper.add(yonghuming);
		uper.add(yonghumingi);
		
		JLabel mima = new JLabel("密码:");
		TextField mimai = new TextField(15);
		downer.add(mima);
		downer.add(mimai);
		
		mainer.add(uper,BorderLayout.NORTH);
		mainer.add(downer,BorderLayout.CENTER);
		
		
		Button queren = new Button("确认");
		Button quxiao = new Button("取消");
		
		bottomer.add(queren);
		bottomer.add(quxiao);
		
		frame.add(mainer,BorderLayout.CENTER);
		frame.add(bottomer,BorderLayout.SOUTH);
		frame.setSize(300, 200);
		frame.setLocation(500, 300);
		frame.setVisible(true);
		frame.pack();
		
	}

	public static void main(String args[]){
		new Login().init();
	}
}
做过DBMS的大神指教一下哦!我的DBMS,加油!!!


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值