java如何添加背景图片
packageqwe;importjava.awt.event.*;importjava.awt.*;importjava.sql.Connection;importja...
package qwe;
import java.awt.event.*;
import java.awt.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.*;
public class ZhuCe1 extends JFrame {
private JLabel la_top, la_name, la_IP, la_pwd, la_rpwd;
private JTextField t_name, t_IP;
private JPasswordField t_pwd1, t_pwd2;
private JButton bt1, bt2;
JLabel lbBg;
char[] s1 = t_pwd1.getPassword();
char[] s2 = t_pwd2.getPassword();
if (String.valueOf(s1).equals(String.valueOf(s2))) {
JOptionPane.showMessageDialog(null, "恭喜您,注册成功!");
} else {
JOptionPane.showMessageDialog(null, "两次输入密码不一致,请重新输入!");
return;
}
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.exit(0);
}
Connection con = null;
Statement s = null;
ResultSet rs=null; 展开
import java.awt.event.*;
import java.awt.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.*;
public class ZhuCe1 extends JFrame {
private JLabel la_top, la_name, la_IP, la_pwd, la_rpwd;
private JTextField t_name, t_IP;
private JPasswordField t_pwd1, t_pwd2;
private JButton bt1, bt2;
JLabel lbBg;
char[] s1 = t_pwd1.getPassword();
char[] s2 = t_pwd2.getPassword();
if (String.valueOf(s1).equals(String.valueOf(s2))) {
JOptionPane.showMessageDialog(null, "恭喜您,注册成功!");
} else {
JOptionPane.showMessageDialog(null, "两次输入密码不一致,请重新输入!");
return;
}
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.exit(0);
}
Connection con = null;
Statement s = null;
ResultSet rs=null; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询