一个java问题,不会制作界面。。

题目如下:制作一个注册界面,要求用户输入用户名,密码(两次输入),手机号码,邮箱,单击注册按钮时要求对用户输入进行验证(所以输入不包含空格):
1、用户名必须长于6位;
2、两次输入的密码必须相等;且密码必须长于8位,必须包含字母和数字;
3、邮箱必须包含@,@前不能有”.”, 邮箱不能以.结束.

希望有大神能给个大概的形式

jsp?html?Swing?还是什么界面?需求说清楚。

java制作界面,用swing做吗,现在基本没使用swing了,
注册类,swing的实现过http://download.csdn.net/ljheee

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


-->

























用户名:
密码:
确认密码:
手机号码:
邮箱:



 jsp的,临时写的,你自己再完善完善

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


-->

























用户名:
密码:
确认密码:
手机号码:
邮箱:



 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

    <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript">
      function check(){
        var username = document.getElementById("username").value;  //用户名
        var password = document.getElementById("password").value;  //密码
        var repassword = document.getElementById("repassword").value; //重复密码
        var phone = document.getElementById("phone").value;  //电话
        var email = document.getElementById("email").value;  //邮箱

        var passmatch = /[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/;  //密码校验
        var phonematch = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; // 手机校验  
        var emailmatch  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; //邮箱验证
        if(username == null || password == null || repassword == null ||
           phone == null || email == null ){  //还要判断==""的情况
           alert("注册信息不完整请重新输入");    
           return false;
        }else if(username.length < 6){
           alert("用户名必须长于6位");
           return false;
        }else if(!password.match(passmatch) || password.length <8){
           alert("密码必须长于8位,必须包含字母和数字");
           return false;
        }else if(repassword != null && repassword != password){
           alert("密码前后不一致,请重新输入");
           return false;
        }else if(!phone.match(phonematch)){
           alert("手机不合法,请重新输入");
           return false;
        }else if(!email.match(emailmatch)){
           alert("您的电子邮件格式不正确,请重新输入");
           return false;
        }
        return true;
      }
    </script>
  </head>

  <body>
   <!--   <input type="button" value="点击测试" onclick="test()"/> -->
   <form action="" method="post"  onsubmit="return check();">
    <table>
        <tr>
             <td>用户名:</td> 
             <td><input type="text" id="username"/></td>
         </tr>
        <tr>
            <td>密码:</td>
            <td><input type="password" id="password"/></td>
        </tr>
        <tr>
            <td>确认密码:</td>
            <td><input type="password" id="repassword"/></td>
        </tr>
            <tr>
            <td>手机号码:</td>
            <td><input type="text" id="phone"/></td>
        </tr>
        <tr>
            <td>邮箱:</td>
            <td><input type="text" id="email"/></td>
        </tr>
        <tr>
           <td> <input type="submit" value="提交"/></td>
        </tr>
    </table>
    </form>
  </body>
</html>

http://blog.csdn.net/qq_24473141/article/details/51363662