主题:请高手帮忙看看为什么界面出现不了
he1205
[专家分:0] 发布于 2009-12-04 14:18:00
本来这个是登陆成功后跳转后的界面,现在连界面都出现不了,哪里出错了
package client;
import java.awt.*;
import javax.swing.*;
import java.awt.Rectangle;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.table.DefaultTableModel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Vector;
import com.sun.org.apache.xpath.internal.operations.Bool;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.io.*;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.ListSelectionEvent;
public class MainFace_User extends JFrame implements ListSelectionListener{
public MainFace_User(String title) {
super(title);
try {
jbInit();
this.setBounds(200,200,735,615);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
///////////////////////////////////////////////////////////////////////////习题管理部分///////////////////////////////////////////////////////
Text_Type1.addItem("");//0
Text_Type1.addItem("选择题");//1
Text_Type1.addItem("填空题");//2
Text_Type1.addItem("判断题");//3
Text_Type1.addItem("计算题");//4
Text_Type1.addItem("简答题");//5
Text_Type1.addItem("综合题");//6
Text_Difficulty.addItem("");
Text_Difficulty.addItem("易");
Text_Difficulty.addItem("中");
Text_Difficulty.addItem("难");
Text_Type2.addItem("");//0
Text_Type2.addItem("选择题");//1
Text_Type2.addItem("填空题");//2
Text_Type2.addItem("判断题");//3
Text_Type2.addItem("计算题");//4
Text_Type2.addItem("简答题");//5
Text_Type2.addItem("综合题");//6
//把当前数据库中存在的课程名称放到JP_getCourse1中
Vector courseimfor=new Vector();
ClientSocket.readCourse(courseimfor);
Text_Course.addItem("");
count=courseimfor.size();
int i=0;
for(i=0;i<count;i++){
Text_Course.addItem(((Vector)courseimfor.elementAt(i)).elementAt(1).toString());
}
usercourse=user.getUser_course();
String sqlStr = "select * from exercises";
ClientSocket.read(sqlStr, StoreText);
setcol();
model.setDataVector(data1,columnNamanes);
TextTable.addMouseListener(
new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
int row=TextTable.getSelectedRow();
if(row<0)return;
Vector ea=new Vector();
preId=TextTable.getValueAt(row,0).toString(); //得到所在行的第一个列的值,作为下面事件传递的参数
for(int i=0;i<StoreText.size();i++){ //取题目的内容
ea=(Vector)StoreText.elementAt(i);
if(ea.elementAt(0).equals(preId)){
Text_Subject.setText(ea.elementAt(3).toString());
Text_Key.setText(ea.elementAt(4).toString());
break;
}
}
}
}
);
Text_Subject.addMouseListener(
new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
Text_Subject.setText("");
}
}
);
Text_Key.addMouseListener(
new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
Text_Key.setText("");
}
}
);
///////////////////////////////////////////////////////////习题管理部分///////////////////////////////////////////////////////
} catch (Exception exception) {
exception.printStackTrace();
}
}
回复列表 (共13个回复)
11 楼
he1205 [专家分:0] 发布于 2009-12-04 14:32:00
class MainFace_User_B_ChangeUserPa_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_B_ChangeUserPa_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.B_ChangeUserPa_actionPerformed(e);
}
}
class MainFace_User_jButton1_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_jButton1_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class MainFace_User_B_CancelUserInfo_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_B_CancelUserInfo_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.B_CancelUserInfo_actionPerformed(e);
}
}
class MainFace_User_B_ChangeUserInfo_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_B_ChangeUserInfo_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.B_ChangeUserInfo_actionPerformed(e);
}
}
class MainFace_User_B_DeteleText_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_B_DeteleText_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.B_DeteleText_actionPerformed(e);
}
}
class MainFace_User_B_AddText_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_B_AddText_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.B_AddText_actionPerformed(e);
}
}
class MainFace_User_Text_Course_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_Text_Course_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.Text_Course_actionPerformed(e);
}
}
class MainFace_User_Text_Type1_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_Text_Type1_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.Text_Type1_actionPerformed(e);
}
}
class MainFace_User_jButton2_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_jButton2_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.quary_actionPerformed(e);
}
}
class MainFace_User_autonewtest_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_autonewtest_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.autonewtest_actionPerformed(e);
}
}
class MainFace_User_jButton4_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_jButton4_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.tranfers_actionPerformed(e);
}
}
class MainFace_User_jButton3_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_jButton3_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.load_actionPerformed(e);
}
}
class MainFace_User_newtest_actionAdapter implements ActionListener {
private MainFace_User adaptee;
MainFace_User_newtest_actionAdapter(MainFace_User adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.newtest_actionPerformed(e);
}
}
12 楼
he1205 [专家分:0] 发布于 2009-12-04 14:35:00
完了,请大家帮我看看,谢谢了,由于代码还有其他类,谁愿意帮我加我QQ1034596870,谢谢了
13 楼
HeroSong [专家分:940] 发布于 2009-12-06 16:54:00
这么多代码,并且又不全,而且不知道用的是何种开发环境,以及是否还有其它的配置参数和辅助环境(如服务器,数据库等),别人是没法帮你找原因的。我建议你仔细想想,在出现这个状况与能够登陆并正确跳转之间,你对这个工程项目都做了哪些事情,不仅包括代码的修改(添、删、改等),还包括配置参数的更新,以及发布环境的变动,以及其它与你的软件工程项目有关的事项的变动等。如果在开发的过程中,严格遵守了开发规程,比如记录变更日志等,这时就可以通过分析日志找到问题的原因并采取行之有效的措施解决之。最后,强烈建议你在工作的过程中养成记录日志的习惯,尤其是在开发一个大型项目时,日志尤为重要。祝你早日解决问题。
我来回复