pcmp投稿
⑴ 如何投稿
有網上投稿和郵寄兩種方式,
郵寄的話就是把你的詩歌文稿以信的方式郵寄給詩刊編輯部或者出版社,
網上投稿就是把電子稿發送到詩刊指定的電子郵箱里,
⑵ 試編寫一個匯編語言程序,要求從鍵盤接收一個四位的16進制數,並在終端上顯示與它等值的二進制數。
試編寫一段程序,要求對鍵盤輸入的小寫字母用大寫字母顯示出來。
⑶ 支付寶怎麼用
支付寶現在搞活動,支付滿10元可以抽獎,大獎3000元的獎品,每天一名,活動地址http://jifen.alipay.com/mgm/mgmPopularize.htm?popularizeInfo=79BWs%3D
⑷ 交通燈設計報告
要求太不詳細了吧?我做了一個是基於PC上顯示的,不用到硬體,直接在電腦上用MASM編譯,通過按鍵控制,不知道有沒有用,好運
DSeg SEGMENT
road1 DB 15 DUP(00h),7ch,7 DUP(00h),7ch,1600 DUP(00h)
road2 DB 3 DUP(00h),12 DUP(5fh),7ch,00h,6 p(00h),7ch,12 DUP(5fh),4000 DUP(00h)
A DB 15 DUP(00h),41h,24 DUP(00h)
B DB 15 DUP(00h),42h,24 DUP(00h)
C DB 15 DUP(00h),43h,24 DUP(00h)
;road3 DB 3 DUP(00h),12 DUP(5fh),7ch,00h,'C',00h,'B',00h,'A',00h,7ch,12 DUP(5fh),4 DUP(00h)
red DB 4fh
yellow DB 4fh
green DB 4fh
DSeg ENDS
;********************************堆棧段*********************************
SSeg SEGMENT stack
DB 100 DUP(?)
top DW ?
SSeg ENDS
;********************************代碼段*********************************
CSeg SEGMENT
ASSUME CS:CSeg,DS:DSeg,SS:SSeg,ES:DSeg
start:
MOV AX,DSeg
MOV DS,AX
MOV ES,AX
MOV AX,SSeg
MOV SS,AX
MOV BP,top
;-------------設備顯示模式--------------------------------
MOV AH,0
MOV AL,3
INT 10h
;********************************畫馬路↓*********************************
MOV CX,6
MOV DX,0200h
draw1: LEA AX,road1
CALL draw_road
INC DH
LOOP draw1
MOV DX,0800h
LEA AX,road2
CALL draw_road
;-------------畫豎排交通燈------------------
MOV DX,0f00h
LEA AX,road2
CALL draw_road
MOV CX,7
MOV DX,1000h
draw3: LEA AX,road1
CALL draw_road
INC DH
LOOP draw3
;*************************************************************************
a1: MOV AH,0BH
INT 21H
CMP AL,00H
jnz a1
MOV AH,08h
INT 21h
cmp al,'z'
jz zidong
cmp al,'q'
jz exit
cmp al,'a'
jz jinji
cmp al,'b'
jz jinjiq
cmp al,'c'
jz huang
cmp al,'d'
jz yellowp
cmp al,'e'
jz dong
cmp al,'f'
jz dongq
cmp al,'g'
jz nan
cmp al,'h'
jz nanq
jmp a1
zidong: CALL red_light
CALL time
CALL reserve
CALL yellow_light
CALL time2
CALL reserve1
CALL green_light
CALL time
CALL reserve2
CALL yellow_light
CALL time2
CALL reserve1
jmp zidong
jinji: call jj_light
jmp a1
jinjiq:
call reserve3
jmp a1
huang: call yellow_light
jmp a1
yellowp:
call reserve1
jmp a1
dong:
call green_light
jmp a1
dongq:
CALL reserve2
jmp a1
nan: call red_light
jmp a1
nanq:
CALL reserve
jmp a1
exit: MOV AH,4ch
INT 21h
;********************************過程定義*********************************
draw_road PROC NEAR
PUSH CX
MOV CX,40
MOV BH,0
MOV BL,7
MOV BP,AX
MOV AX,1301h
INT 10h;顯示字元
POP CX
RET
draw_road ENDP
draw_light PROC
MOV CX,1
MOV BP,AX
MOV AX,1301h
INT 10h
RET
draw_light ENDP
time PROC
PUSH DX
PUSH BX
MOV AH,0
INT 1ah;調用系統時間
MOV BX,DX
ADD BX,72
time1: MOV AH,0
INT 1ah
CMP BX,DX
JNZ time1
POP BX
POP DX
RET
time ENDP
time2 PROC
PUSH DX
PUSH BX
MOV AH,0
INT 1ah
MOV BX,DX
ADD BX,18
time3: MOV AH,0
INT 1ah
CMP BX,DX
JNZ time3
POP BX
POP DX
RET
time2 ENDP
jj_light PROC
MOV DX,0815h
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
MOV DX,0a0fh
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
MOV DX,0f11h
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
MOV DX,0e17h
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
RET
jj_light ENDP
red_light PROC
MOV DX,0811h
LEA AX,red
MOV BH,0
MOV BL,02h
CALL draw_light
MOV DX,0a0fh
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
MOV DX,0f15h
LEA AX,red
MOV BH,0
MOV BL,02h
CALL draw_light
MOV DX,0e17h
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
RET
red_light ENDP
yellow_light PROC
MOV DX,0813h
LEA AX,yellow
MOV BH,0
MOV BL,0eh
CALL draw_light
MOV DX,0c0fh
LEA AX,yellow
MOV BH,0
MOV BL,0eh
CALL draw_light
MOV DX,0f13h
LEA AX,yellow
MOV BH,0
MOV BL,0eh
CALL draw_light
MOV DX,0c17h
LEA AX,yellow
MOV BH,0
MOV BL,0eh
CALL draw_light
RET
yellow_light ENDP
green_light PROC
MOV DX,0815h
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
MOV DX,0e0fh
LEA AX,red
MOV BH,0
MOV BL,02h
CALL draw_light
MOV DX,0f11h
LEA AX,green
MOV BH,0
MOV BL,04h
CALL draw_light
MOV DX,0a17h
LEA AX,red
MOV BH,0
MOV BL,02h
CALL draw_light
RET
green_light ENDP
reserve PROC ;恢復顏色
MOV DX,0811h
LEA AX,red
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0a0fh
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0f15h
LEA AX,red
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0e17h
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
RET
reserve ENDP
reserve1 PROC
MOV DX,0813h
LEA AX,yellow
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0c0fh
LEA AX,yellow
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0f13h
LEA AX,yellow
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0c17h
LEA AX,yellow
MOV BH,0
MOV BL,00h
CALL draw_light
RET
reserve1 ENDP
reserve2 PROC
MOV DX,0815h
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0e0fh
LEA AX,red
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0f11h
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0a17h
LEA AX,red
MOV BH,0
MOV BL,00h
CALL draw_light
RET
reserve2 ENDP
reserve3 PROC
MOV DX,0815h
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0a0fh
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0f11h
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
MOV DX,0e17h
LEA AX,green
MOV BH,0
MOV BL,00h
CALL draw_light
ret
reserve3 ENDP
CSeg ENDS
END start
⑸ 用什麼軟體可以把C語言翻譯成匯編語言
每個C語言編譯器都可以把C代碼翻譯成匯編代碼
你查一下相關編譯器的手冊就知道了 不同的編譯器所使用的參數也會不一樣
例如GCC的編譯器 用-O參數就可以輸出匯編代碼
⑹ java 做QQ
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.ActionEvent;
import java.io.*;
import javax.swing.*;
import java.awt.Button;
import java.awt.Panel;
import java.lang.String;
import javax.swing.JOptionPane;
public class QQ extends Frame implements ActionListener{
Label Lname ,Lpassword; //定義用戶名和密碼的標簽
TextField Tname; //定義用戶名的文本框
JPasswordField Tpassword; //定義密碼的文本框。註:使用JPasswordField的好處就是輸入的密碼是以****顯示給用戶的
Panel panel1=new Panel(); //定義面板
Button Load,login; //定義登陸和注冊的按鈕
boolean b=false;
File file1; //定義記錄用戶注冊的用戶名和密碼的文件夾
Writer writer;
String []Usersname=new String[1024]; //定義記錄用戶名的數組
String []Userspassword=new String[1024];//定義記錄密碼的數組
public QQ(){
Lname=new Label ("用戶名");Lname.setBackground(Color.red);//設置標簽的背景顏色
Lpassword=new Label ("密碼");Lpassword.setBackground(Color.red);//設置標簽的背景顏色
Tname=new TextField (10);
Tpassword=new JPasswordField (10);
Load=new Button("登陸");Load.setBackground(Color.lightGray);
login=new Button("注冊");login.setBackground(Color.lightGray);
add(panel1,BorderLayout.CENTER);
setLayout(new CardLayout(3,2));
panel1.add(Lname);
panel1.add(Tname);
panel1.add(Lpassword);
panel1.add(Tpassword);
panel1.add(Load);Load.addActionListener(this);
panel1.add(login);login.addActionListener(this);
}
public void actionPerformed(ActionEvent e){
// 用戶登錄事件處理
if (e.getSource() == Load) {
String name1 = Tname.getText();
String password1 = Tpassword.getText();
boolean flag = false;
int index = 0;
for (int i = 0; i < Usersname.length; i++) {
if (name1.equals(Usersname[i])) {
flag = true;
index = i;
break;
}
}
if (flag && password1.equals(Userspassword[index])) {
//處理用戶登錄成功後的反饋信息
JOptionPane.showMessageDialog(null, "恭喜您登陸成功!", "消息", JOptionPane.INFORMATION_MESSAGE);
} else {
JOptionPane.showMessageDialog(null, "對不起您的用戶名或密碼錯誤!", "錯誤",JOptionPane.ERROR_MESSAGE);
}
}
// 用戶注冊模塊的事件處理
if (e.getSource() == login) {
String NCmp = Tname.getText();
String PCmp = Tpassword.getText();
boolean flag = false;
for (int i = 0; i < Usersname.length; i++) {
if (NCmp.equals(Usersname[i])) {
flag = true;
break;
}
}
if (flag) {
JOptionPane.showMessageDialog(null, "對不起您的用戶名已經注冊!", "錯誤", JOptionPane.ERROR_MESSAGE);
} else {
int index = 0;
JOptionPane.showMessageDialog(null, "注冊成功!", "消息", JOptionPane.INFORMATION_MESSAGE);
for (int i = 0; i < Usersname.length; i++) {
if (Usersname[i] == null) {
Usersname[i] = NCmp;
index = i;
break;
}
}
Userspassword[index] = PCmp;
}
try{
file1=new File("Student.dat");
FileWriter fw=new FileWriter(file1,true);
fw.write("用戶名"+"\t\t"+"密碼"+"\n");
fw.write(NCmp+"\t\t"+PCmp+"\n");
fw.close();
}catch (IOException e1){
e1.printStackTrace();
}
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Frame Fstudent=new QQ();
Fstudent.setSize(200,200);
Fstudent.setTitle("QQ模擬系統");
// 關閉窗口
Fstudent.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
Fstudent.setVisible(true);
}
}
自己寫的 呵呵不好意思 主要功能就是登陸 和注冊
注冊有用戶名同名時會提示(報錯)
你運行下 就可以了
不好還可以聯系呵呵
這個東西 還是自己去摸索吧 網上的資料很多 要知道 你如果真的做軟體開發的話 你就要去自學很多東西 而不是 去弄現成的 學會好好 網路吧 而不是提問
⑺ 微機原理 電子按計算器 有一個BUG 不會改了 求幫忙
我列出自己收藏的全部相關代碼,你就會發現你的代碼錯在哪裡了。
附件:
Z8279 EQU 212H ;8279的控制埠
D8279 EQU 210H ;8279的數據埠
LEDMOD EQU 00H ;左邊輸入,八位顯示,外部解碼八位顯示
DATA SEGMENT ;定義數據段
D1 DB ?
D2 DB ?
D3 DB ?
D4 DB ?
D5 DB ?
DATA ENDS
CODE SEGMENT ; 代碼段開始
ASSUME CS:CODE,DS:DATA;,SS:STACK
START:
PUSH CS
POP DS
MOV DX,Z8279 ;寫入命令字
MOV AL,LEDMOD
OUT DX,AL
MOV AL,38H
OUT DX,AL
MOV AL,0D1H ;清空FIFO RAM寄存器
OUT DX,AL
NOP
MOV AL,0C2H
OUT DX,AL
NOP
WAIIT:
NOP
IN AL,DX ;讀入按鍵
MOV BL,AL ;保存按鍵
AND AL,80H ;保留D7位
CMP AL,80H ;檢查D7位是否為1,即檢查FIFO是否還在清除期間
JE WAIIT ;FIFO正在清除期間(D7位為1)則跳轉等待
MOV AL,BL ;將狀態字重新輸入AL中
AND AL,0FH ;保留低四位判斷FIFO RAM中是否有數據(D2-D0表示FIFO RAM中數據的個數)
CMP AL,00H ;判斷FIFO RAM中是否沒有數據
JE WAIIT ;若沒有數據即無鍵按下則等待
MOV AL,40H ;讀FIFO RAM命令字,0100 0000,D4位為0,所以RAM地址不自動加1
OUT DX,AL ;寫入命令字
MOV DX,D8279 ;讀入FIFO RAM內容
IN AL,DX
NOP
CMP AL,3BH ;若退出計算則跳轉
JE FINI
MOV CL,AL ;保存所按下的鍵(位移量)
LEA BX,LEE ;查鍵盤編碼表,得到相應的按鍵的鍵盤編碼,並存入AL中
XLAT
CMP AL,79H ;檢查是否為"="號
JE JISUAN ;若為"="號則跳轉到計算處
CMP AL,5EH ;檢查是否為清零鍵
JE QINGLING ;若是則跳轉到清零模塊
MOV AH,00H ;若為其他(數字或運算符)按鍵則入棧保存起來,以便計算時使用
PUSH AX
MOV AL,CL ;將按鍵放入AL中
LEA BX,LED ;查表得到按鍵對應的LED編碼並存入AL中
XLAT
MOV DX,Z8279 ;8279控制埠地址
MOV CL,AL ;保存按鍵的LED編碼
MOV AL,80H ;寫入寫顯示命令,RAM地址為0000
OUT DX,AL
MOV AL,CL ;將按鍵編碼放入AL中
MOV DX,D8279 ;將AL中內容寫到數碼管上
OUT DX,AL
MOV DX,Z8279 ;置空FIFO RAM寄存器
MOV AL,0C2H
OUT DX,AL
JMP WAIIT ;等待下一次鍵輸入
FINI: MOV DX,Z8279
MOV AL,0D3H
OUT DX,AL
JMP $
QINGLING: MOV DX,Z8279 ;清FIFO RAM寄存器與LED顯示
MOV AL,0D1H
OUT DX,AL
JMP WAIIT ;等待輸入
;開始計算
JISUAN:
AND AX,00H
POP AX ;將第五次按下的鍵出棧
MOV D5,AL ;將按鍵的鍵盤編碼值賦給D5(是數字)
AND AX,00H
POP AX ;將第四次按下的鍵出棧
MOV D3,AL ;將按鍵的鍵盤編碼值賦給D3(是數字)
MOV AH,00H
MOV DL,0AH
MUL DL
ADD AL,D5
MOV D3,AL ;存放在D3中(第二個運算數字)
AND AX,00H
POP AX ;將第三次按下的鍵出棧
MOV D4,AL ;將按鍵的鍵盤編碼值賦給D4(是運算符)
AND AX,00H
POP AX ;將第二次按下的鍵出棧
MOV D2,AL ;將按鍵的鍵盤編碼值賦給D2(是數字)
AND AX,00H
POP AX ;將第一次按下的鍵出棧
MOV D1,AL ;將按鍵的鍵盤編碼值賦給D1(是數字)
MOV AH,00H
MOV DL,0AH
MUL DL
ADD AL,D2
MOV D1,AL ;存放在D1中(第一個運算數字)
AND AX,00H
CMP D4,77H ;判斷運算符是否為加號,若是則跳轉到加法運算處
JE JIAFA
CMP D4,7CH ;判斷運算符是否為減號,若是則跳轉到減法運算處
JE JIANFA
CMP D4,39H ;判斷運算符是否為乘號,若是則跳轉到乘法運算處
JE CHENGFA
CMP D4,71H ;判斷運算符是否為除號,若是則跳轉到除法運算處
JE CHUFA
;加法計算
JIAFA:
MOV AL,D1
MOV BL,D3
ADD AL,BL
JMP SHUCHU
;減法計算
JIANFA:
MOV AL,D1
MOV BL,D3
SUB AL,BL
JMP SHUCHU
;乘法計算
CHENGFA:
MOV AL,D1
MOV DL,D3
MUL DL
JMP SHUCHU
;除法計算
CHUFA:
MOV AL,D1
MOV DL,D3
DIV DL
JMP SHUCHU
;輸出計算結果
SHUCHU:
CMP AL,64H ;將AL中的運算結果和十進制數100相比較,以便接下來在LED數碼管上顯示
JNS SHUCHU2 ;若AL大於等於100,則跳轉到SHUCHU2處顯示(顯示三位數)
CMP AL,0AH ;將AL中的運算結果和十進制數10相比較,以便接下來在LED數碼管上顯示
JNS SHUCHU1 ;若AL大於等於10,則跳轉到SHUCHU1處顯示(顯示兩位數)
LEA BX,TABLE ;獲得運算結果的LED編碼
XLAT
MOV DX,Z8279 ;
MOV CL,AL
MOV AL,87H ;寫顯示RAM命令,RAM地址為0111
OUT DX,AL
MOV AL,CL
MOV DX,D8279 ;將AL中內容寫到數碼管上
OUT DX,AL
MOV DX,Z8279 ;清FIFO RAM寄存器,置空FIFO RAM寄存器
MOV AL,0C2H
OUT DX,AL
NOP
JMP WAIIT ;一次計算完成等待下一次計算
SHUCHU1: MOV AH,00H
MOV CL,0AH
DIV CL
LEA BX,TABLE
XLAT
;顯示十位數
MOV DX,Z8279
MOV CL,AL
MOV AL,87H ;寫顯示RAM命令,RAM地址為0111
OUT DX,AL
MOV AL,CL
MOV DX,D8279 ;將AL中內容寫到數碼管上
OUT DX,AL
;顯示個位數
MOV DX,Z8279
MOV AL,86H ;寫顯示RAM命令,RAM地址為0110
OUT DX,AL
MOV AL,AH
LEA BX,TABLE
XLAT
MOV DX,D8279
OUT DX,AL
MOV DX,Z8279
MOV AL,0C2H
OUT DX,AL
NOP
JMP WAIIT ;一次計算完成等待下一次計算
SHUCHU2: MOV AH,00H
MOV CL,64H
DIV CL
LEA BX,TABLE
XLAT
;顯示百位數
MOV DX,Z8279
MOV CL,AL
MOV AL,87H ;寫顯示RAM命令,RAM地址為0111
OUT DX,AL
MOV AL,CL
MOV DX,D8279 ;將AL中內容寫到數碼管上
OUT DX,AL
;顯示十位數
MOV DX,Z8279
MOV AL,86H ;寫顯示RAM命令,RAM地址為0110
OUT DX,AL
MOV AL,AH
MOV AH,00H
MOV CL,0AH
DIV CL
LEA BX,TABLE
XLAT
MOV DX,D8279 ;將AL中內容寫到數碼管上
OUT DX,AL
;顯示個位數
MOV DX,Z8279
MOV AL,85H ;寫顯示RAM命令,RAM地址為0101
OUT DX,AL
MOV AL,AH
LEA BX,TABLE
XLAT
MOV DX,D8279 ;將AL中內容寫到數碼管上
OUT DX,AL
MOV DX,Z8279 ;清FIFO RAM寄存器,置空FIFO RAM寄存器
MOV AL,0C2H
OUT DX,AL
NOP
JMP WAIIT ;一次計算完成等待下一次計算
;LED上的數字顯示編碼
LED: DB 07H,66H,06H,3FH ;7,4,1,0的編碼
DB 00H,00H,00H,00H
DB 7FH,6DH,5BH,71H ;8,5,2,F的編碼
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 6FH,7DH,4FH,79H ;9,6,3,E的編碼
DB 00H,00H,00H,00H
DB 77H,7CH,39H,5EH ;A,B,C,D的編碼
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
;鍵盤編碼時是根據8*8的鍵盤進行編碼的
LEE: DB 07H,04H,01H,00H ;按鍵按下時對應的LED數碼管分別顯示7,4,1,0
DB 00H,00H,00H,00H
DB 08H,05H,02H,71H ;按鍵按下時對應的LED數碼管分別顯示8,5,2,F
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 09H,06H,03H,79H ;按鍵按下時對應的LED數碼管分別顯示9,6,3,E
DB 00H,00H,00H,00H
DB 77H,7CH,39H,5EH ;按鍵按下時對應的LED數碼管分別顯示A,B,C,D
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
DB 00H,00H,00H,00H
TABLE:
DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH ;對應於LED數碼管上0-9的編碼
CODE ENDS
END START
⑻ java實現簡單登錄界面
你的代碼我不想看了- -!
給你我寫的參考參考,我是不知道你幹嘛要在監聽器里寫JFrame
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
@SuppressWarnings("serial")
public class LoginFrame extends JFrame{
private static final String USER = "Freedom";
private static final String PASSWORD = "Destiny";
private JTextField user;
private JPasswordField password;
public LoginFrame(){
user = new JTextField(15);
password = new JPasswordField(15);
password.setEchoChar('*');
JPanel p1 = new JPanel();
p1.add(new JLabel("User:"));
p1.add(user);
p1.add(new JLabel("PW:"));
p1.add(password);
add(p1,BorderLayout.CENTER);
JPanel p2 = new JPanel();
JButton button = new JButton("OK");
button.addActionListener(new ActionListener()//登錄監聽器
{
@SuppressWarnings("deprecation")
public void actionPerformed(ActionEvent e){
if(user.getText().equals(LoginFrame.USER) &&
password.getText().equals(LoginFrame.PASSWORD)){
JOptionPane.showMessageDialog(LoginFrame.this, "Login Success!");
}else{
JOptionPane.showMessageDialog(LoginFrame.this, "Login Fail!");
}
}
});
p2.add(button);
button = new JButton("Exit");
button.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e){
System.exit(0);
}
});
p2.add(button);
add(p2,BorderLayout.SOUTH);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
setVisible(true);
}
public static void main(String[] args) {
new LoginFrame();
}
}