Exception in thread "main" java.lang.Error: 无法解析的编译问题:
无法解析 MainWindow at MainWindow.main(MainWindow.java:201)
我把代码分批贴出来
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class MainWindow extends JFrame implements ActionListener{
JPanel panel1;
Container c;
JMenuBar MenuB;
JMenu FundamentalMenu,ContractMenu,BusinessMenu,OtherMenu,UserMenu,CargoReceiverMenu,TruckMenu,PilotMenu,ConsignorMenu,GoodsMenu,
ContractRegisterMenu,ContractSearchMenu,FreightInformationMenu,FreightSearchMenu,AccidentManagedMenu,WeZhanMenu;
JMenuItem CargoReceiverTableMenuItem,CargoReceiverInMenuItem,CargoReceiverFileTableMenuItem,//收货人档案
TruckTableMenuItem,TruckInMenuItem,TruckFileTableMenuItem,//车辆档案
PilotTableMenuItem,PilotInMenuItem,PilotFileTableMenuItem,//驾驶员档案
ConsignorTableMenuItem,ConsignorInMenuItem,ConsignorFileTableMenuItem,//托运人档案
GoodsTableMenuItem,GoodsInMenuItem,GoodsFileMenuItem,//货品档案
ContractRegisterTableMenuItem,ContractRegisterInMenuItem,ContractFileTable,//合同登记
ContractSearchCargoMenuItem,ContractSearchSyntheticalMenuItem,ContractSearchConsigorMenuItem,ContractSearchGoodsMenuItem,//合同查寻
FreightInformationTableMenuItem,FreightInformationInMenuItem,FreightInformationFileMenuItem,//货运信息
FreightSearchPilotMenuItem,FreightSearchGoodsMenuItem,FreightSearchConsignorMenuItem,FreightSearchDanHaoMenuItem,
FreightSearchLicenseMenuItem,//货运查询
AccidentManagedTableMenuItem,AccidentManagedinMenuItem,AccidentManagedPrinterMenuItem,//交通事故管理
WeZhanTableMenuItem,WeZhanInMenuItem,WeZhanFileMenuItem,//驾驶员违章登记
UserLoginMenuItem,UserAddMenuItem,UserModifyMenuItem,UserDeleteMenuItem;//用户管理
JLabel titleLabel,AuthorLabel,DateLabel;
public MainWindow()
{
MenuB=new JMenuBar();
//--基本资料管理--
FundamentalMenu=new JMenu("基本资料");
CargoReceiverMenu=new JMenu("收货人档案");
CargoReceiverTableMenuItem=new JMenuItem("表格界面");
CargoReceiverInMenuItem=new JMenuItem("收货人档案录入");
CargoReceiverFileTableMenuItem=new JMenuItem("收货人档案表");
TruckMenu=new JMenu("车辆档案");
TruckTableMenuItem=new JMenuItem("表格界面");
TruckInMenuItem=new JMenuItem("车辆登记录入");
TruckFileTableMenuItem=new JMenuItem("车辆档案表");
PilotMenu=new JMenu("驾驶员档案");
PilotTableMenuItem=new JMenuItem("表格界面");
PilotInMenuItem=new JMenuItem("驾驶人员登记录入");
PilotFileTableMenuItem=new JMenuItem("打印");
ConsignorMenu=new JMenu("托运人档案");
ConsignorTableMenuItem=new JMenuItem("表格界面");
ConsignorInMenuItem=new JMenuItem("托运人档案录入");
ConsignorFileTableMenuItem=new JMenuItem("托运人档案表");
GoodsMenu=new JMenu("货品信息");
GoodsTableMenuItem=new JMenuItem("表格界面");
GoodsInMenuItem=new JMenuItem("货品信息录入");
GoodsFileMenuItem=new JMenuItem("货品信息表");
CargoReceiverMenu.add(CargoReceiverTableMenuItem);
CargoReceiverMenu.add(CargoReceiverInMenuItem);
CargoReceiverMenu.add(CargoReceiverFileTableMenuItem);
FundamentalMenu.add(CargoReceiverMenuItem);//收货人档案
TruckMenu.add(TruckTableMenuItem);
TruckMenu.add(TruckInMenuItem);
TruckMenu.add(TruckFileTableMenuItem);
FundamentalMenu.add(TruckMenu);//车辆档案
PilotMenu.add(PilotTableMenuItem);
PilotMenu.add(PilotInMenuItem);
PilotMenu.add(PilotFileTableMenuItem);
FundamentalMenu.add(PilotMenu);//驾驶员档案 ConsignorMenu.add(ConsignorTableMenuItem);
ConsignorMenu.add(ConsignorInMenuItem);
ConsignorMenu.add(ConsignorFileTableMenuItem);
FundamentalMenu.add(ConsignorMenu);//托运人档案 GoodsMenu.add(GoodsTableMenuItem);
GoodsMenu.add(GoodsInMenuItem);
GoodsMenu.add(GoodsFileMenuItem);
FundamentalMenu.add(GoodsMenu);//货品信息
MenuB.add(FundamentalMenu);
//--合同管理--
ContractMenu=new JMenu("合同管理");
ContractRegisterMenu=new JMenu("合同登记");
ContractRegisterTableMenuItem=new JMenuItem("表格界面管理");
ContractRegisterInMenuItem=new JMenuItem("货运合同录入");
ContractFileTable=new JMenuItem("货运合同");
ContractSearchMenu=new JMenu("合同查询");
ContractSearchCargoMenuItem=new JMenuItem("按收货人查询");
ContractSearchSyntheticalMenuItem=new JMenuItem("综合查询");
ContractSearchConsigorMenuItem=new JMenuItem("按托运人查询");
ContractSearchGoodsMenuItem=new JMenuItem("按货品查询");
ContractRegisterMenu.add(ContractRegisterTableMenuItem);
ContractRegisterMenu.add(ContractRegisterInMenuItem);
ContractRegisterMenu.add(ContractFileTable);
ContractMenu.add(ContractRegisterMenu);//合同登记
ContractSearchMenu.add(ContractSearchCargoMenuItem);
ContractSearchMenu.add(ContractSearchSyntheticalMenuItem);
ContractSearchMenu.add(ContractSearchConsigorMenuItem);
ContractSearchMenu.add(ContractSearchGoodsMenuItem);
ContractMenu.add(ContractSearchMenu);//合同查询
MenuB.add(ContractMenu);
无法解析 MainWindow at MainWindow.main(MainWindow.java:201)
我把代码分批贴出来
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class MainWindow extends JFrame implements ActionListener{
JPanel panel1;
Container c;
JMenuBar MenuB;
JMenu FundamentalMenu,ContractMenu,BusinessMenu,OtherMenu,UserMenu,CargoReceiverMenu,TruckMenu,PilotMenu,ConsignorMenu,GoodsMenu,
ContractRegisterMenu,ContractSearchMenu,FreightInformationMenu,FreightSearchMenu,AccidentManagedMenu,WeZhanMenu;
JMenuItem CargoReceiverTableMenuItem,CargoReceiverInMenuItem,CargoReceiverFileTableMenuItem,//收货人档案
TruckTableMenuItem,TruckInMenuItem,TruckFileTableMenuItem,//车辆档案
PilotTableMenuItem,PilotInMenuItem,PilotFileTableMenuItem,//驾驶员档案
ConsignorTableMenuItem,ConsignorInMenuItem,ConsignorFileTableMenuItem,//托运人档案
GoodsTableMenuItem,GoodsInMenuItem,GoodsFileMenuItem,//货品档案
ContractRegisterTableMenuItem,ContractRegisterInMenuItem,ContractFileTable,//合同登记
ContractSearchCargoMenuItem,ContractSearchSyntheticalMenuItem,ContractSearchConsigorMenuItem,ContractSearchGoodsMenuItem,//合同查寻
FreightInformationTableMenuItem,FreightInformationInMenuItem,FreightInformationFileMenuItem,//货运信息
FreightSearchPilotMenuItem,FreightSearchGoodsMenuItem,FreightSearchConsignorMenuItem,FreightSearchDanHaoMenuItem,
FreightSearchLicenseMenuItem,//货运查询
AccidentManagedTableMenuItem,AccidentManagedinMenuItem,AccidentManagedPrinterMenuItem,//交通事故管理
WeZhanTableMenuItem,WeZhanInMenuItem,WeZhanFileMenuItem,//驾驶员违章登记
UserLoginMenuItem,UserAddMenuItem,UserModifyMenuItem,UserDeleteMenuItem;//用户管理
JLabel titleLabel,AuthorLabel,DateLabel;
public MainWindow()
{
MenuB=new JMenuBar();
//--基本资料管理--
FundamentalMenu=new JMenu("基本资料");
CargoReceiverMenu=new JMenu("收货人档案");
CargoReceiverTableMenuItem=new JMenuItem("表格界面");
CargoReceiverInMenuItem=new JMenuItem("收货人档案录入");
CargoReceiverFileTableMenuItem=new JMenuItem("收货人档案表");
TruckMenu=new JMenu("车辆档案");
TruckTableMenuItem=new JMenuItem("表格界面");
TruckInMenuItem=new JMenuItem("车辆登记录入");
TruckFileTableMenuItem=new JMenuItem("车辆档案表");
PilotMenu=new JMenu("驾驶员档案");
PilotTableMenuItem=new JMenuItem("表格界面");
PilotInMenuItem=new JMenuItem("驾驶人员登记录入");
PilotFileTableMenuItem=new JMenuItem("打印");
ConsignorMenu=new JMenu("托运人档案");
ConsignorTableMenuItem=new JMenuItem("表格界面");
ConsignorInMenuItem=new JMenuItem("托运人档案录入");
ConsignorFileTableMenuItem=new JMenuItem("托运人档案表");
GoodsMenu=new JMenu("货品信息");
GoodsTableMenuItem=new JMenuItem("表格界面");
GoodsInMenuItem=new JMenuItem("货品信息录入");
GoodsFileMenuItem=new JMenuItem("货品信息表");
CargoReceiverMenu.add(CargoReceiverTableMenuItem);
CargoReceiverMenu.add(CargoReceiverInMenuItem);
CargoReceiverMenu.add(CargoReceiverFileTableMenuItem);
FundamentalMenu.add(CargoReceiverMenuItem);//收货人档案
TruckMenu.add(TruckTableMenuItem);
TruckMenu.add(TruckInMenuItem);
TruckMenu.add(TruckFileTableMenuItem);
FundamentalMenu.add(TruckMenu);//车辆档案
PilotMenu.add(PilotTableMenuItem);
PilotMenu.add(PilotInMenuItem);
PilotMenu.add(PilotFileTableMenuItem);
FundamentalMenu.add(PilotMenu);//驾驶员档案 ConsignorMenu.add(ConsignorTableMenuItem);
ConsignorMenu.add(ConsignorInMenuItem);
ConsignorMenu.add(ConsignorFileTableMenuItem);
FundamentalMenu.add(ConsignorMenu);//托运人档案 GoodsMenu.add(GoodsTableMenuItem);
GoodsMenu.add(GoodsInMenuItem);
GoodsMenu.add(GoodsFileMenuItem);
FundamentalMenu.add(GoodsMenu);//货品信息
MenuB.add(FundamentalMenu);
//--合同管理--
ContractMenu=new JMenu("合同管理");
ContractRegisterMenu=new JMenu("合同登记");
ContractRegisterTableMenuItem=new JMenuItem("表格界面管理");
ContractRegisterInMenuItem=new JMenuItem("货运合同录入");
ContractFileTable=new JMenuItem("货运合同");
ContractSearchMenu=new JMenu("合同查询");
ContractSearchCargoMenuItem=new JMenuItem("按收货人查询");
ContractSearchSyntheticalMenuItem=new JMenuItem("综合查询");
ContractSearchConsigorMenuItem=new JMenuItem("按托运人查询");
ContractSearchGoodsMenuItem=new JMenuItem("按货品查询");
ContractRegisterMenu.add(ContractRegisterTableMenuItem);
ContractRegisterMenu.add(ContractRegisterInMenuItem);
ContractRegisterMenu.add(ContractFileTable);
ContractMenu.add(ContractRegisterMenu);//合同登记
ContractSearchMenu.add(ContractSearchCargoMenuItem);
ContractSearchMenu.add(ContractSearchSyntheticalMenuItem);
ContractSearchMenu.add(ContractSearchConsigorMenuItem);
ContractSearchMenu.add(ContractSearchGoodsMenuItem);
ContractMenu.add(ContractSearchMenu);//合同查询
MenuB.add(ContractMenu);
解决方案 »
- java 16进制字符串 转换成0x00 0x00 ....
- 我几个月不上分数没有了啊。
- 简短语句,大家看看说的是什么意思?
- 如何利用右键弹出菜单,对文本框的内容进行复制,粘贴等操作?
- object 是高度抽象的一个类.当初JAVA设计者如何想到这些属性的??
- 请各位教师帮帮忙!
- 请问VJ++下可不可以用JDK编译过了的CLASS
- 请问这两种将string转换为float的方法,有什么区别是?
- 关于自定义包的问题,求救~~~~~~~~~~~~~~~
- 2001年的最后一个问题,我不带到2002年!!!!java数据库高手们,快进来!
- jtable能不能设置表头为可编辑,就像jtable的单元格一样?
- jfreechat的问题
BusinessMenu=new JMenu("运单业务");
FreightInformationMenu=new JMenu("货运信息");
FreightInformationTableMenuItem=new JMenuItem("表格界面");
FreightInformationInMenuItem=new JMenuItem("货运信息登记录入");
FreightInformationFileMenuItem=new JMenuItem("货运信息表");
FreightSearchMenu=new JMenu("货运信息查询");
FreightSearchPilotMenuItem=new JMenuItem("按驾驶员查询");
FreightSearchGoodsMenuItem=new JMenuItem("按货品查询");
FreightSearchConsignorMenuItem=new JMenuItem("按托运人查询");
FreightSearchDanHaoMenuItem=new JMenuItem("按货运单号查询");
FreightSearchLicenseMenuItem=new JMenuItem("按车牌号查询");
FreightInformationMenu.add(FreightInformationTableMenuItem);
FreightInformationMenu.add(FreightInformationInMenuItem);
FreightInformationMenu.add(FreightInformationFileMenuItem);
BusinessMenu.add(FreightInformationMenu);//货运信息
FreightSearchMenu.add(FreightSearchPilotMenuItem);
FreightSearchMenu.add(FreightSearchGoodsMenuItem);
FreightSearchMenu.add(FreightSearchConsignorMenuItem);
FreightSearchMenu.add(FreightSearchDanHaoMenuItem);
FreightSearchMenu.add(FreightSearchLicenseMenuItem);
BusinessMenu.add(FreightSearchMenu);//货运信息查询
MenuB.add(BusinessMenu);
//--其它管理--
OtherMenu=new JMenu("其它管理");
AccidentManagedMenu=new JMenu("交通事故管理");
AccidentManagedTableMenuItem=new JMenuItem("表格界面");
AccidentManagedinMenuItem=new JMenuItem("交通事故管理录入");
AccidentManagedPrinterMenuItem=new JMenuItem("打印");
WeZhanMenu=new JMenu("驾驶员违章登记");
WeZhanTableMenuItem=new JMenuItem("表格界面");
WeZhanInMenuItem=new JMenuItem("驾驶员违章登记录入");
WeZhanFileMenuItem=new JMenuItem("驾驶员违章登记表");
AccidentManagedMenu.add(AccidentManagedTableMenuItem);
AccidentManagedMenu.add(AccidentManagedinMenuItem);
AccidentManagedMenu.add(AccidentManagedPrinterMenuItem);
OtherMenu.add(AccidentManagedMenu);//交通事故管理
WeZhanMenu.add(WeZhanTableMenuItem);
WeZhanMenu.add(WeZhanInMenuItem);
WeZhanMenu.add(WeZhanFileMenuItem);
OtherMenu.add(WeZhanMenu);//驾驶员违章登记
MenuB.add(OtherMenu);
//--用户管理--
UserMenu=new JMenu("用户管理");
UserLoginMenuItem=new JMenuItem("用户登陆");
UserAddMenuItem=new JMenuItem("添加用户");
UserModifyMenuItem=new JMenuItem("修改用户");
UserDeleteMenuItem=new JMenuItem("删除用户");
UserMenu.add(UserLoginMenuItem);
UserMenu.add(UserAddMenuItem);
UserMenu.add(UserModifyMenuItem);
UserMenu.add(UserDeleteMenuItem);
MenuB.add(UserMenu);
// ----------------------------------
setJMenuBar(MenuB); titleLabel=new JLabel(new ImageIcon(".\\pic.jpg"));
c=getContentPane();
c.setLayout(new BorderLayout());
panel1=new JPanel();
panel1.setLayout(new BorderLayout());
panel1.add(titleLabel,BorderLayout.CENTER);
c.add(panel1,BorderLayout.CENTER);
setBounds(100,50,400,300);
show();
// --初始设置
FundamentalMenu.setEnabled(false);
ContractMenu.setEnabled(false);
BusinessMenu.setEnabled(false);
OtherMenu.setEnabled(false);
}
public static void main(String args[])
{
MainWindow =new MainWindow();
}
}
Exception in thread "main" java.lang.Error: 无法解析的编译问题:
类型 MainWindow 必须实现继承的抽象方法 ActionListener.actionPerformed(ActionEvent)
无法解析 CargoReceiverMenuItem at MainWindow.<init>(MainWindow.java:4)
at MainWindow.main(MainWindow.java:202)
Exception in thread "main" java.lang.Error: 无法解析的编译问题:
类型 MainWindow 必须实现继承的抽象方法 ActionListener.actionPerformed(ActionEvent)
无法解析 CargoReceiverMenuItem at MainWindow.<init>(MainWindow.java:4)
at MainWindow.main(MainWindow.java:202)
// TODO
}
FundamentalMenu.add(CargoReceiverMenu);//收货人档案
public void actionPerformed(ActionEvent arg0) {
// TODO
}