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