📄 register.java
字号:
/*
* Register.java
*
* Created on 2006年8月27日, 上午11:04
*/
package com.gamvan.club.users.im.userlogin;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.swing.JOptionPane;
/**
*
* @author Administrator
*/
public class Register extends javax.swing.JFrame {
/** Creates new form Register */
private ObjectInputStream dataIn=null;
private ObjectOutputStream dataOut=null;
public Register() {
initComponents();
setResizable(false);
//居中显示
Dimension screen = getToolkit().getScreenSize();
setLocation((screen.width - getSize().width) / 2,
(screen.height - getSize().height) / 2);
}
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
usernameLabel = new javax.swing.JLabel();
usernameField = new javax.swing.JTextField();
passwordLabel = new javax.swing.JLabel();
passwordField = new javax.swing.JPasswordField();
jLabel3 = new javax.swing.JLabel();
trueNameField = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
countryField = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
favField = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
telField = new javax.swing.JTextField();
submitBtn = new javax.swing.JButton();
resetBtn = new javax.swing.JButton();
confPasswordLabel = new javax.swing.JLabel();
confPassword = new javax.swing.JPasswordField();
myWebLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("\u65b0\u7528\u6237\u6ce8\u518c");
setAlwaysOnTop(true);
addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
formMouseMoved(evt);
}
});
usernameLabel.setText("\u7528\u6237\u6635\u79f0*");
passwordLabel.setText("\u5bc6\u7801*");
jLabel3.setText("\u771f\u5b9e\u59d3\u540d");
trueNameField.setText("\u4e0d\u613f\u900f\u9732");
jLabel4.setText("\u6240\u5c5e\u56fd\u5bb6");
countryField.setText("\u4e2d\u56fd");
jLabel5.setText("\u7231\u597d");
favField.setText("\u4fdd\u5bc6");
jLabel6.setText("\u8054\u7cfb\u7535\u8bdd");
telField.setText("\u540c\u4e0a\u54c8\uff1a\uff09");
submitBtn.setText("\u63d0\u4ea4");
submitBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
submitBtnActionPerformed(evt);
}
});
resetBtn.setText("\u91cd\u7f6e");
resetBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resetBtnActionPerformed(evt);
}
});
confPasswordLabel.setText("\u786e\u8ba4\u5bc6\u7801*");
myWebLabel.setForeground(new java.awt.Color(0, 0, 255));
myWebLabel.setText("\u8bbf\u95ee\u6211\u4eec\u7684\u7f51\u7ad9");
myWebLabel.setToolTipText("Http://club.gamvan.com");
myWebLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
myWebLabelMouseClicked(evt);
}
});
myWebLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
myWebLabelMouseMoved(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(usernameLabel)
.addComponent(passwordLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(usernameField, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
.addComponent(passwordField, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel6)
.addGap(10, 10, 10)
.addComponent(telField, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel5)
.addGap(34, 34, 34)
.addComponent(favField, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel4)
.addGap(10, 10, 10)
.addComponent(countryField, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel3)
.addGap(10, 10, 10)
.addComponent(trueNameField, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(confPasswordLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(confPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(submitBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(resetBtn, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE))))
.addGroup(layout.createSequentialGroup()
.addGap(67, 67, 67)
.addComponent(myWebLabel)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(usernameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(usernameLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(passwordLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(confPasswordLabel)
.addComponent(confPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -