1、求用JAVA編寫的登陸界面!
這是我剛做的,JAVA布局與其它語言相比難度較大,建議你將兩張圖片PS成一張圖片,做為背景,加入到JFRAME中,以降低難度。
要是這個你喜歡,不要忘記多給我加分啊!!!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
public class LoginIn extends JFrame{
JTextField f1;
JTextField f2;
JButton b1;
JButton b2;
String power;//表示許可權
String imgePath = "e:/workspace/GUI/14.gif";
JPanel p5;
Image img = Toolkit.getDefaultToolkit().createImage(imgePath);
LoginIn(){
Container cp=getContentPane();
Label l1=new Label("用戶:");
Label l2=new Label("密碼:");
JPanel p1=new JPanel();
JPanel p2=new JPanel();
JPanel p3=new JPanel();
JPanel p4=new JPanel();
p5=new JPanel(){
protected void paintChildren(Graphics g) {
g.drawImage(img,0,0,this);
super.paintChildren(g);
}
};
f1=new JTextField(15);
f2=new JPasswordField(15);
b1=new JButton("登錄");
b2=new JButton("重置");
p1.setBackground(Color.orange);
p2.add(l1);
p2.add(f1);
p2.setBorder(new MatteBorder(0,0,0,0,Color.BLACK));
p2.setBackground(Color.ORANGE);
p3.add(l2);
p3.add(f2);
p3.setBackground(Color.ORANGE);
p3.setBorder(new MatteBorder(0,0,0,0,Color.BLACK));
p4.add(b1);
p4.add(b2);
p4.setBorder(new MatteBorder(-3,-3,-3,-3,Color.CYAN));
p4.setBackground(Color.ORANGE);
p5.setLayout(new FlowLayout(FlowLayout.CENTER,20,20));
p5.add(p2);
p5.add(p3);
p5.add(p4);
cp.add(p5,BorderLayout.CENTER);
b1.addActionListener(new Enter());
b2.addActionListener(new ReWrite());
addWindowListener(new winClose());
}
public static void main(String[] args) {
LoginIn log=new LoginIn();
log.setTitle("系統登錄");
log.setSize(360,250);
log.setVisible(true);
}
class Enter implements ActionListener{
public void actionPerformed(ActionEvent e)
{
if((f1.getText()).equals("admin")&&(f2.getText()).equals("123"))
{
JOptionPane.showMessageDialog(null, "登錄成功!用戶許可權是adimistrator");
power="adminstrator";
}
else if((f1.getText()).equals("snake")&&(f2.getText()).equals("123456"))
{
JOptionPane.showMessageDialog(null, "登錄成功!登錄成功!用戶許可權是user");
power="adminstrator";
}
else JOptionPane.showMessageDialog(null, "登錄失敗,請重新登錄!");
}
}
class ReWrite implements ActionListener{
public void actionPerformed(ActionEvent e)
{
f1.setText("");
f2.setText("");
f1.requestFocus();
}
}
class winClose extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
(e.getWindow()).dispose();
System.exit(0);
}
}
}
2、java網頁程序設計,怎樣跳轉到用戶界面從登陸界面
最容易理解的可以說使用·<a href="main.html">main 界面</a>來實現,後面學習jsp 還有更多方法!
3、求用JAVA設計的簡單的登陸界面代碼
<%@ page language="java" pageEncoding="UTF-8"%>
<HTML>
<HEAD>
<TITLE>車友信息管理系統</TITLE>
<LINK href="images/public.css" type=text/css rel=stylesheet>
<LINK href="images/login.css" type=text/css rel=stylesheet>
<STYLE type=text/css>
</STYLE>
<script type="text/javascript">
function changeValidateCode(obj) {
//獲取當前的時間作為參數,無具體意義
var timenow = new Date().getTime();
//每次請求需要一個不同的參數,否則可能會返回同樣的驗證碼
//這和瀏覽器的緩存機制有關系,也可以把頁面設置為不緩存,這樣就不用這個參數了。
obj.src="rand.action?d="+timenow;
}
</script>
</HEAD>
<BODY onload="fon()">
<form id=login name="fr" method="post" action="loginpurview"
onsubmit="return func()">
<DIV id=div1>
<TABLE id=login height="100%" cellSpacing=0 cellPadding=0 width=800
align=center>
<TBODY>
<TR id=main>
<TD>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD colSpan=4>
</TD>
</TR>
<TR height=30>
<TD width=380>
</TD>
<TD>
</TD>
<TD>
</TD>
<TD>
</TD>
</TR>
<TR height=40>
<TD rowSpan=4>
</TD>
<TD>
用戶名:
</TD>
<TD>
<INPUT class=textbox id="txtUserName" type="text" name="username">
</TD>
<TD width=120>
</TD>
</TR>
<TR height=40>
<TD>
密 碼:
</TD>
<TD>
<INPUT class=textbox id=txtUserPassword type="password"
name="password">
</TD>
<TD width=120>
</TD>
</TR>
<TR height=40>
<TD>
驗證碼:
</TD>
<td colspan="4" class="top_hui_text">
<input type="text" name="str" id="user2" style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; " >
<img src="rand.action" onclick="changeValidateCode(this)" title="點擊圖片刷新驗證碼" /></td>
</TD>
</TR>
<TR height=40>
<TD align=left>
<div align="left"><INPUT id=btnLogin type=submit value=" 登 錄 " name=btnLogin/></div>
</TD>
<TD align=center>
<div align="center"><INPUT id=btnLogin1 type=reset value=" 重置 " name=btnLogin1 onclick="return reset1()"/></div>
</TD>
<TD align=right>
<div align="right"><a href="register.jsp">注冊</a></div>
</TD>
<TD width=120>
</TD>
</TR>
<TR height=110>
<TD colSpan=4>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR id=root height=104>
<TD>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<DIV id=div2 style="DISPLAY: none"></DIV>
</CONTENTTEMPLATE>
</form>
</BODY>
</HTML>
<script>
function func(){
var username = fr.username.value;
var password = fr.password.value;
if(username==""){
alert("用戶名不能為空");
return false;
}else if(password==""){
alert("密碼不能為空");
return false;
}else if(username.indexOf("'")!=-1)
{
alert("您的用戶名中含有非法字元,請重新輸入");
return false;
}
else if(password.indexOf("'")!=-1)
{
alert("您的密碼中含有非法字元,請重新 輸入");
return false;
}else
{
return form_submit();
}
}
function reset1()
{
fr.reset();1
return false;
}
</script>
一個完整的jsp頁面,直接復制就行
4、登陸界面的java代碼怎麼寫?
概述具體框架使用jframe,文本框組件:JTextField;密碼框組件:JPasswordField;標簽組件:JLabel;復選框組件:JCheckBox;單選框組件:JRadioButton;按鈕組件JButton。
登錄界面:
import javax.swing.*;
import java.awt.*; //導入必要的包
public class denglu extends JFrame{
JTextField jTextField ;//定義文本框組件
JPasswordField jPasswordField;//定義密碼框組件
JLabel jLabel1,jLabel2;
JPanel jp1,jp2,jp3;
JButton jb1,jb2; //創建按鈕
public denglu(){
jTextField = new JTextField(12);
jPasswordField = new JPasswordField(13);
jLabel1 = new JLabel("用戶名");
jLabel2 = new JLabel("密碼");
jb1 = new JButton("確認");
jb2 = new JButton("取消");
jp1 = new JPanel();
jp2 = new JPanel();
jp3 = new JPanel();
//設置布局
this.setLayout(new GridLayout(3,1));
jp1.add(jLabel1);
jp1.add(jTextField);//第一塊面板添加用戶名和文本框
jp2.add(jLabel2);
jp2.add(jPasswordField);//第二塊面板添加密碼和密碼輸入框
jp3.add(jb1);
jp3.add(jb2); //第三塊面板添加確認和取消
// jp3.setLayout(new FlowLayout()); //因為JPanel默認布局方式為FlowLayout,所以可以注銷這段代碼.
this.add(jp1);
this.add(jp2);
this.add(jp3); //將三塊面板添加到登陸框上面
//設置顯示
this.setSize(300, 200);
//this.pack();
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
this.setTitle("登陸");
}
public static void main(String[] args){
new denglu();
}
}
拓展內容java swing包
Swing 是一個為Java設計的GUI工具包。
Swing是JAVA基礎類的一部分。
Swing包括了圖形用戶界面(GUI)器件如:文本框,按鈕,分隔窗格和表。
Swing提供許多比AWT更好的屏幕顯示元素。它們用純Java寫成,所以同Java本身一樣可以跨平台運行,這一點不像AWT。它們是JFC的一部分。它們支持可更換的面板和主題(各種操作系統默認的特有主題),然而不是真的使用原生平台提供的設備,而是僅僅在表面上模仿它們。這意味著你可以在任意平台上使用JAVA支持的任意麵板。輕量級組件的缺點則是執行速度較慢,優點就是可以在所有平台上採用統一的行為。
概念解析:
JFrame – java的GUI程序的基本思路是以JFrame為基礎,它是屏幕上window的對象,能夠最大化、最小化、關閉。
JPanel – Java圖形用戶界面(GUI)工具包swing中的面板容器類,包含在javax.swing 包中,可以進行嵌套,功能是對窗體中具有相同邏輯功能的組件進行組合,是一種輕量級容器,可以加入到JFrame窗體中。。
JLabel – JLabel 對象可以顯示文本、圖像或同時顯示二者。可以通過設置垂直和水平對齊方式,指定標簽顯示區中標簽內容在何處對齊。默認情況下,標簽在其顯示區內垂直居中對齊。默認情況下,只顯示文本的標簽是開始邊對齊;而只顯示圖像的標簽則水平居中對齊。
JTextField –一個輕量級組件,它允許編輯單行文本。
JPasswordField – 允許我們輸入了一行字像輸入框,但隱藏星號(*) 或點創建密碼(密碼)
JButton – JButton 類的實例。用於創建按鈕類似實例中的 "Login"。
5、Java 網頁設計
jsp
如果想走高端的路線 參見 《JAVA設計模式》
不過現在安卓較火,很有潛力
6、急求!!要求用java設計登陸頁面
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Dimension;
import javax.swing.JButton;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JLabel;
public class Login implements ActionListener{
JFrame jFrame = null; // @jve:decl-index=0:visual-constraint="168,33"
private JPanel jContentPane = null;
private JButton login = null;
private JButton exit = null;
private JTextField userName = null;
private JPasswordField password = null;
private JLabel uname = null;
private JLabel passwordLable = null;
/**
* This method initializes jFrame
*
* @return javax.swing.JFrame
*/
private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setSize(new Dimension(447, 235));
jFrame.setContentPane(getJContentPane());
}
return jFrame;
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
passwordLable = new JLabel();
passwordLable.setBounds(new Rectangle(115, 79, 56, 33));
passwordLable.setText("密 碼:");
uname = new JLabel();
uname.setBounds(new Rectangle(113, 28, 58, 31));
uname.setText("用戶名:");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getLogin(), null);
jContentPane.add(getExit(), null);
jContentPane.add(getUserName(), null);
jContentPane.add(getPassword(), null);
jContentPane.add(uname, null);
jContentPane.add(passwordLable, null);
}
return jContentPane;
}
/**
* This method initializes login
*
* @return javax.swing.JButton
*/
private JButton getLogin() {
if (login == null) {
login = new JButton();
login.setBounds(new Rectangle(130, 131, 70, 32));
login.setText("登錄");
login.addActionListener(this);
}
return login;
}
/**
* This method initializes exit
*
* @return javax.swing.JButton
*/
private JButton getExit() {
if (exit == null) {
exit = new JButton();
exit.setBounds(new Rectangle(216, 131, 73, 32));
exit.setText("退出");
exit.addActionListener(this);
}
return exit;
}
/**
* This method initializes userName
*
* @return javax.swing.JTextField
*/
private JTextField getUserName() {
if (userName == null) {
userName = new JTextField();
userName.setBounds(new Rectangle(189, 28, 133, 31));
}
return userName;
}
/**
* This method initializes password
*
* @return javax.swing.JPasswordField
*/
private JPasswordField getPassword() {
if (password == null) {
password = new JPasswordField();
password.setBounds(new Rectangle(189, 79, 133, 33));
}
return password;
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == login) {
String userNameString = userName.getText();
String userPassword = new String(password.getPassword());
if (userNameString != null && userNameString.equals("123") && userPassword != null && userPassword.equals("123")) {
System.out.println("登錄成功");
JOptionPane.showMessageDialog(jFrame, "登錄成功");
}else {
System.out.println("登錄失敗");
JOptionPane.showMessageDialog(jFrame, "登錄失敗");
}
}
if (e.getSource() == exit) {
System.exit(0);
}
}
public static void main(String[] args) {
Login login = new Login();
JFrame jFrame = login.getJFrame();
jFrame.setVisible(true);
jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
}
}
主要實現的方法是在actionPerformed這個方法中,給登錄按鈕和退出按鈕添加事件:login.addActionListener(this);exit.addActionListener(this);
7、java如何做一個可以登陸網頁的程序
你如果要簡單,在login頁面加三個表單標簽,一個text,一個password,一個submit,外面框個form標簽,action指定到你程序後台,跳到資料庫驗證,然後返回結果,將用戶名密碼提交到後台驗證方法很多,樓上講的struts是其中一種,但是如果你連登陸都不知道做,還是先別用struts了,直接將action跳到另一個頁面,另一個頁面獲取login頁面的用戶名和密碼,
login.jsp中寫
<from action ="logindo.jsp">
用戶名:<input type="text" name="username"><br>
密碼:<input type="password" name="password"><br>
<input type = "submit" value="登陸">
</from>
logindo.jsp中寫
<%
String username = request.getParamenter("username");//獲取登陸頁面穿過來的用戶名
String password= request.getParamenter("password");//獲取登錄頁面傳過來的密碼
.login(username,password);//跑到程序後台驗證用戶名密碼錯誤
%>
其他的我就不寫了,大致都寫完了,希望對你有幫助,別忘記採納
8、java登陸界面的設計
把myloginpanel.setVisible(true);拿到主方法中最下面一行試一下。
9、用java寫一個登陸界面代碼。
概述具體框架使用jframe,文本框組件:;密碼框組件:JPasswordField;標簽組件:JLabel;復選框組件:JCheckBox;單選框組件:JRadioButton;按鈕組件JButton。
登錄界面:
import javax.swing.*;
import java.awt.*; //導入必要的包
public class denglu extends JFrame{
JTextField jTextField ;//定義文本框組件
JPasswordField jPasswordField;//定義密碼框組件
JLabel jLabel1,jLabel2;
JPanel jp1,jp2,jp3;
JButton jb1,jb2; //創建按鈕
public denglu(){
jTextField = new JTextField(12);
jPasswordField = new JPasswordField(13);
jLabel1 = new JLabel("用戶名");
jLabel2 = new JLabel("密碼");
jb1 = new JButton("確認");
jb2 = new JButton("取消");
jp1 = new JPanel();
jp2 = new JPanel();
jp3 = new JPanel();
//設置布局
this.setLayout(new GridLayout(3,1));
jp1.add(jLabel1);
jp1.add(jTextField);//第一塊面板添加用戶名和文本框
jp2.add(jLabel2);
jp2.add(jPasswordField);//第二塊面板添加密碼和密碼輸入框
jp3.add(jb1);
jp3.add(jb2); //第三塊面板添加確認和取消
// jp3.setLayout(new FlowLayout()); //因為JPanel默認布局方式為FlowLayout,所以可以注銷這段代碼.
this.add(jp1);
this.add(jp2);
this.add(jp3); //將三塊面板添加到登陸框上面
//設置顯示
this.setSize(300, 200);
//this.pack();
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
this.setTitle("登陸");
}
public static void main(String[] args){
new denglu();
}
}
拓展內容java swing包
Swing 是一個為Java設計的GUI工具包。
Swing是JAVA基礎類的一部分。
Swing包括了圖形用戶界面(GUI)器件如:文本框,按鈕,分隔窗格和表。
Swing提供許多比AWT更好的屏幕顯示元素。它們用純Java寫成,所以同Java本身一樣可以跨平台運行,這一點不像AWT。它們是JFC的一部分。它們支持可更換的面板和主題(各種操作系統默認的特有主題),然而不是真的使用原生平台提供的設備,而是僅僅在表面上模仿它們。這意味著你可以在任意平台上使用JAVA支持的任意麵板。輕量級組件的缺點則是執行速度較慢,優點就是可以在所有平台上採用統一的行為。
概念解析:
JFrame – java的GUI程序的基本思路是以JFrame為基礎,它是屏幕上window的對象,能夠最大化、最小化、關閉。
JPanel – Java圖形用戶界面(GUI)工具包swing中的面板容器類,包含在javax.swing 包中,可以進行嵌套,功能是對窗體中具有相同邏輯功能的組件進行組合,是一種輕量級容器,可以加入到JFrame窗體中。。
JLabel – JLabel 對象可以顯示文本、圖像或同時顯示二者。可以通過設置垂直和水平對齊方式,指定標簽顯示區中標簽內容在何處對齊。默認情況下,標簽在其顯示區內垂直居中對齊。默認情況下,只顯示文本的標簽是開始邊對齊;而只顯示圖像的標簽則水平居中對齊。
JTextField –一個輕量級組件,它允許編輯單行文本。
JPasswordField – 允許我們輸入了一行字像輸入框,但隱藏星號(*) 或點創建密碼(密碼)
JButton – JButton 類的實例。用於創建按鈕類似實例中的 "Login"。
10、求用 java 設計一個 登錄頁面 設計圖 在下面
/*
* LoginForm.java
*
*/
import java.awt.Toolkit;
/**
*
* @author LynK
*/
public class LoginForm extends javax.swing.JFrame {
private static final long serialVersionUID = 1L;
/** Creates new form LoginForm */
public LoginForm() {
initComponents();
int x = (int) ((Toolkit.getDefaultToolkit().getScreenSize().getWidth() - this
.getWidth()) / 2);
int y = (int) ((Toolkit.getDefaultToolkit().getScreenSize().getHeight() - this
.getHeight()) / 2);
this.setLocation(x, y);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jPanel2 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jComboBox1 = new javax.swing.JComboBox();
jSeparator2 = new javax.swing.JSeparator();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("\u7cfb\u7edf\u767b\u5f55");
setResizable(false);
jLabel1.setFont(new java.awt.Font("微軟雅黑", 0, 36));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("\u56fe\u4e66\u7ba1\u7406\u7cfb\u7edf 9.34");
jLabel2.setFont(new java.awt.Font("微軟雅黑", 0, 14));
jLabel2.setText("\u7528\u6237\u540d:");
jLabel3.setFont(new java.awt.Font("微軟雅黑", 0, 14));
jLabel3.setText("\u5bc6 \u7801:");
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
"超級管理員", "普通用戶" }));
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(
jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout
.setHorizontalGroup(jPanel2Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel2Layout
.createSequentialGroup()
.addGap(61, 61, 61)
.addGroup(
jPanel2Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel3))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
jPanel2Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(
jComboBox1,
0,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(
jPasswordField1,
javax.swing.GroupLayout.DEFAULT_SIZE,
145,
Short.MAX_VALUE))
.addGap(96, 96, 96)));
jPanel2Layout
.setVerticalGroup(jPanel2Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout
.createSequentialGroup()
.addContainerGap(16, Short.MAX_VALUE)
.addGroup(
jPanel2Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(
jComboBox1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
jPanel2Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(
jPasswordField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap()));
jButton1.setText("\u767b\u5f55");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("\u53d6\u6d88");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(
jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout
.setHorizontalGroup(jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addContainerGap()
.addComponent(
jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
352,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addComponent(jSeparator1,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 376,
Short.MAX_VALUE)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addContainerGap()
.addComponent(
jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
352,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addComponent(jSeparator2,
javax.swing.GroupLayout.DEFAULT_SIZE, 376,
Short.MAX_VALUE)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(74, 74, 74)
.addComponent(jButton1)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED,
110, Short.MAX_VALUE)
.addComponent(jButton2).addGap(78, 78,
78)));
jPanel1Layout
.setVerticalGroup(jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addContainerGap()
.addComponent(
jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
52,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jPanel2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(
jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(29, 29, 29)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap(36, Short.MAX_VALUE)));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addGroup(
layout.createSequentialGroup().addContainerGap().addComponent(
jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
layout.setVerticalGroup(layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addGroup(
layout.createSequentialGroup().addContainerGap().addComponent(
jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
pack();
}// </editor-fold>
//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
/**
* 以下就可處理業務
*/
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
/**
* @param args
* the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new LoginForm().setVisible(true);
}
});
}
//GEN-BEGIN:variables
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPasswordField jPasswordField1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
// End of variables declaration//GEN-END:variables
}