1. java编写一个登陆和注册信息的源代码,最简单的就可以,不需要数据库的那种
你这个不用数据库真的是有点难搞
我写了个用集合存储的,你看看,能否帮上你
java.util.List<String>list=newArrayList<String>();
list.add("qq=123");//存储的时候用(用户名=密码)的形式
list.add("ww=456");
Stringusername="qq";
Stringpassword="123";
for(inti=0;i<list.size();i++){
Stringnum=username+"="+password;
if(num.equals(list.get(i))){
System.out.println("登录成功");
break;
}
}
2. JAVA局域网聊天系统源码,简单的聊天系统,有界面包括登录注册界面、聊天界面
这可就看设计者是怎么设计的了,具体的还得自己怎么去操作。
3. JAVA 中 GUI登录界面设计源代码
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
public class Login {
private JFrame frame = new JFrame("登录");
private Container c = frame.getContentPane();
private JTextField username = new JTextField();
private JPasswordField password = new JPasswordField();
private JButton ok = new JButton("确定");
private JButton cancel = new JButton("取消");
public Login(){
frame.setSize(300,200);
c.setLayout(new BorderLayout());
initFrame();
frame.setVisible(true);
}
private void initFrame() {
//顶部
JPanel titlePanel = new JPanel();
titlePanel.setLayout(new FlowLayout());
titlePanel.add(new JLabel("系统管理员登录"));
c.add(titlePanel,"North");
//中部表单
JPanel fieldPanel = new JPanel();
fieldPanel.setLayout(null);
JLabel l1 = new JLabel("用户名:");
l1.setBounds(50, 20, 50, 20);
JLabel l2 = new JLabel("密 码:");
l2.setBounds(50, 60, 50, 20);
fieldPanel.add(l1);
fieldPanel.add(l2);
username.setBounds(110,20,120,20);
password.setBounds(110,60,120,20);
fieldPanel.add(username);
fieldPanel.add(password);
c.add(fieldPanel,"Center");
//底部按钮
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout());
buttonPanel.add(ok);
buttonPanel.add(cancel);
c.add(buttonPanel,"South");
}
public static void main(String[] args){
new Login();
}
}
4. javaweb 要eclipse+mysql登录注册系统源代码
这有一个管理系统的里面有用户管理
把添加改成注册就行了嘛 登录自带的有
Java web管理系统DEMO
有问题可以联系我贴吧ID qq
5. Java如何实现网页程序自动登录
之前,也考虑过使用单点登录,几经尝试之后还是放弃了。
我习惯使用Java,本能地开始寻找Java的解决方法,在Google中输入"Java自动登录"、"Java网页模拟登录"、"JavaPost登录",结果倒是不少,内容也差不多,我尝试很多次终究也没有达到我预期的目标。后来,我都不知道这些代码应该在jsp页面中执行还是在c/s结构的程序中执行。但这些代码确实管用。 我们先分析一下代码: URLurl=newURL(surl); URLConnectionconn=url.openConnection(); conn.setDoOutput(true); OutputStreamWriterout=newOutputStreamWriter(conn.getOutputStream()); Stringstr="username=yourname&password=123456"; out.write(str); out.flush(); out.close(); 到这里,如果在C/S结构中,且参数正确,程序能够成功登录到这个oa系统,要看到结果,你可以通过下面的代码将系统服务器返回的结果System.out.println()出来。 Stringsling=""; Stringscontent=""; BufferedReaderin=newBufferedReader(newInputStreamReader(conn.getInputStream(),"UTF-8")); while((sling=in.readLine())!=null) scontent+=in+"\r\n"; System.out.println(scontent); 在C/S结构下,可以到得到控制台输出了返回值,从返回内容里可以看出程序已经成功登录,但要是把这个网址浏览器打开,还是得重新登录,问题没有得到根本解决。如果只是恶意注册,到这里应该就达到目的了。 看样子C/S结构下不容易实现网页程序自动登录,除非你在C/S程序中内嵌一个浏览器,直接在这个浏览器中自动访问系统,应该没有别的方法,主要问题在于我们没有办法共享Session. 为了便于共享Session,我们只能在浏览器中实现网页自动登录,通过上面的代码在jsp页面中测试,达不到预期目标。 网页自动登录,就是希望程序自动填充用户名和密码,然后以Post方式提交给登录页面的Form所指向的action页面或方法。我将系统的登录页面的源代码保存成一个网页,然后在username和password文本框中设置默认值,然后通过这网页登录系统,测试后,发现可行。接下来,你可能已经想到了解决方法。 我们可以通过url.openConnection()建立连接,将返回的scontent打印出来,然后接着打印以下代码: out.println("\r\n"); out.println("document.getElementsByName(\"username\")[0].value=yourname;\r\n"); out.println("document.getElementsByName(\"password\")[0].value=123456;\r\n"); out.println("document.forms[0].submit();\r\n"); out.println("\r\n"); 原理很简单,通过login.jsp将登录页面的全部源代码写在当前页面,然后使用javascript脚本将用户名和密码的值填充上,最后提交表单。这样中,终于实现了自动登录的目标。现在我通过一个特殊的网址,就可以自动访问这个oa了。 你可能注意到参数url,他的值是经过加密的,内容是用户名和密码。当然,你也可以加上有效期,即在有效期内这个链接才是有效的,才可以实现自动登录。
6. java登录验证源代码
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Test_Login extends javax.swing.JFrame {
private JPanel jPanel1;
private JButton bntLogin;
private JButton bntCannel;
private JPasswordField pwd;
private JTextField username;
private JLabel jLabel2;
private JLabel jLabel1;
public static void main(String[] args) {
Test_Login inst = new Test_Login();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
public Test_Login() {
super();
initGUI();
}
private void initGUI() {
try {
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
{
jPanel1 = new JPanel();
getContentPane().add(jPanel1, BorderLayout.CENTER);
jPanel1.setLayout(null);
{
jLabel1 = new JLabel();
jPanel1.add(jLabel1);
jLabel1.setText("用户名");
jLabel1.setBounds(45, 30, 75, 25);
}
{
jLabel2 = new JLabel();
jPanel1.add(jLabel2);
jLabel2.setText("密码");
jLabel2.setBounds(45, 75, 55, 15);
}
{
username = new JTextField();
jPanel1.add(username);
username.setBounds(100, 30, 140, 25);
}
{
pwd = new JPasswordField();
jPanel1.add(pwd);
pwd.setBounds(100, 70, 140, 25);
}
{
bntLogin = new JButton();
jPanel1.add(bntLogin);
bntLogin.setText("登陆");
bntLogin.setBounds(40, 120, 60, 30);
bntLogin.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (username.getText().equals("lisong")
&& pwd.getText().equals("lisong")) {
JOptionPane.showMessageDialog(Test_Login.this,
"登录成功");
} else {
JOptionPane.showMessageDialog(Test_Login.this,
"登录失败");
}
}
});
bntCannel = new JButton();
jPanel1.add(bntCannel);
bntCannel.setText("取消");
bntCannel.setBounds(180, 120, 60, 30);
bntCannel.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
System.exit(0);
}
});
}
}
pack();
setSize(300, 215);
} catch (Exception e) {
e.printStackTrace();
}
}
}
7. java怎么通过代码登入教务系统
我使用几系统都B/S结构每登录都需要输入用户名密码觉非麻烦考虑其同事需求妨写自登录程序吧前考虑使用单点登录几经尝试放弃
我习惯使用Java本能始寻找Java解决Google输入Java自登录、Java网页模拟登录、Java Post 登录结倒少内容差我尝试终究没达我预期目标我都知道些代码应该jsp页面执行c/s结构程序执行些代码确实管用
我先析代码
String surl = "";
URL url = new URL(surl);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter out=new OutputStreamWriter(conn.getOutputStream());
String str = "username=yourname&password=123456";
out.write(str);
out.flush();
out.close();
C/S结构且参数确程序能够功登录oa系统要看结通面代码系统服务器返结System.out.println()
String sling = "";
String scontent = "";
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(),"UTF-8"));
while ((sling = in.readLine()) != null)
scontent += in + "\r\n";
System.out.println(scontent);
C/S结构控制台输返值返内容看程序已经功登录要网址浏览器打重新登录问题没根本解决恶意注册应该达目
看C/S结构容易实现网页程序自登录除非C/S程序内嵌浏览器直接浏览器自访问系统应该没别主要问题于我没办共享Session
便于共享Session我能浏览器实现网页自登录通面代码jsp页面测试达预期目标
网页自登录希望程序自填充用户名密码Post式提交给登录页面Form所指向action页面或我系统登录页面源代码保存网页usernamepassword文本框设置默认值通网页登录系统测试发现行接能已经想解决
我通url.openConnection()建立连接返scontent打印接着打印代码:
out.println("\r\n");
原理简单通login.jsp登录页面全部源代码写前页面使用javascript脚本用户名密码值填充提交表单终于实现自登录目标现我通特殊网址例自访问oa
能注意参数url值经加密内容用户名密码加效期即效期内链接才效才实现自登录
8. 求一个用Java写的登陆界面的源代码,输入用户名,密码,登录后显示欢迎登录,加分
这个是我之前做着玩的,只做了个登录,不要介意,登录名:admin,密码:admin。
9. 求一个基于Java编写的医院预约系统源码
摘 要
进入21世纪以来,网络的空前发展给人们的工作和生活带来了极大的便利,信息化建设已经成为节约运营成本、提高工作效率的首选。相比之下,国内相当数量的中小医院的医院预约挂号工作还采用相对保守的手工工作方式,数据信息查询和存储的成本较高,但效率却很低下。为了使医院预约挂号管理更高效、更科学,决定开发医院预约挂号平台。
本文采用结构化分析的方法,详细阐述了一个功能比较强大的医院预约挂号平台的前后台开发、操作流程和涉及的一些关键技术。首先进行了可行性分析,然后是系统分析,通过实际的业务流程调研,分析业务流程和系统的组织结构,完成了数据流分析和数据字典;然后是系统设计阶段主要完成了功能模块的划分、阐述了系统设计的思想、数据库的设计和系统设计的工具及技术。该阶段对本系统各个模块的功能进行了详细设计,形成了本系统的功能模块图;数据库设计时先进行了概念结构设计,然后进行了逻辑结构设计,最后完成了数据表的设计。
根据前几个阶段的分析和设计,本系统在设计方面采用B/S模式,同时使用JSP技术进行基本页面的设计与功能实现,后台数据库选用SQL Server 2000数据库。本系统的设计实施为医院预约挂号系统的运行做基础,为医院预约挂号管理工作提供良好的条件。
关键词:预约挂号;结构化分析;平台
Abstract
In the 21st century, the unprecedented development of the network to the people's work and life has brought great convenience, information technology has become operational cost savings, improve efficiency of choice. In contrast, a considerable number of domestic small and medium hospitals, hospital appointment registration work is relatively conservative with manual work, data query and the high cost of storage, but the efficiency is very low. To make an appointment by registered hospital management more efficient, more science, decided to develop the hospital appointment registration platform.
In this paper, structural analysis, a function described in detail more powerful platform for the hospital before and after the appointment register sets and development, operational processes, and some of the key technologies involved. First, a feasibility analysis, and system analysis, business process through the actual research, analyze business processes and organizational structure of the system to complete the data flow analysis and data dictionary; then completed the system design phase is mainly divided into functional moles, elaborated the idea of the system design, database design and system design tools and techniques. This phase of the system function of each mole in detail the design, forming a functional block diagram of the system; database design first tested the concept design, followed by a logic design, and finally completed the data table design.
According to the first few stages of the analysis and design, the system used in the design of B / S mode, JSP technology, the basic page design and implementation of function, use SQL Server 2000 database backend database. Implementation of the system design registration system for the operation of the hospital appointment as a foundation for the hospital management to provide a good appointment registration conditions.
Key Words:Appointment registration; structural analysis; platform
目 录
摘 要... I
Abstract II
一、引言... 1
(一)项目开发的背景... 1
(二)项目开发的目的... 1
二、可行性分析及总体设计原则... 2
(一)可行性分析... 2
1.技术可行性... 2
2.经济可行性... 2
3.社会可行性... 3
(二)总体设计原则... 3
三、系统分析... 5
(一)业务流程分析... 5
(二)数据流图... 6
(三)数据字典... 9
四、系统设计... 13
(一)系统功能设计... 13
(二)系统数据库设计... 14
1.概念结构设计... 14
2.逻辑结构设计... 18
3.数据库表设计... 18
(三)系统开发工具与开发模式的选择... 20
1.系统开发工具... 20
2.系统设计模式... 21
五、系统实现... 22
(一)用户模块... 22
1.登录及注册管理模块... 22
2.首界面... 23
3.用户注册界面... 24
4.公告界面... 25
5.科室预约界面... 26
6.留言界面... 27
(三)管理员模块... 28
1.登录界面... 28
2.科室管理界面... 28
3.添加专家界面... 29
六、性能测试与分析... 30
(一)测试的重要性... 30
(二)测试实例的研究与选择... 30
(三)测试环境与测试条件... 31
(四)实例测试... 32
(五)系统评价... 32
(六)测试结果... 33
参 考 文 献... 35
致 谢... 36