我刚刚尝试将NetBeans项目合并到Eclipse(javaSE-1.6)中。但是,两个IDE之间存在差异。总的来说,我试图通过网络摄像头实现QR码的扫描。我得到的只是nullpointer例外&我怀疑它是由以下代码引起的。基本上我有3个JLabels&一个按钮。如何在不使用'org.openide.util.NbBundle'的情况下解决方法使其工作?
JLabel scannerScreen = new JLabel("connecting to camera");
scannerScreen.setBounds(72, 50, 274, 205);
//suspected erroneous code at following line
//org.openide.awt.Mnemonics.setLocalizedText(scannerScreen, org.openide.util.NbBundle.getMessage(ScannerUI.class, "ScannerPanel.scannerScreen.text")); // NOI18N
panel.add(scannerScreen);
JLabel lblNewLabel_1 = new JLabel("Welcome ");
lblNewLabel_1.setBounds(72, 11, 274, 58);
panel.add(lblNewLabel_1);
//suspected erroneous code at following line
//org.openide.awt.Mnemonics.setLocalizedText(nextScan, org.openide.util.NbBundle.getMessage(ScannerUI.class, "ScannerPanel.nextScan.text")); // NOI18N
JButton nextScan = new JButton("Next Scan");
nextScan.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt)
{
nextScanActionPerformed(evt);
}
});
nextScan.setBounds(72, 266, 89, 23);
panel.add(nextScan);
答案 0 :(得分:0)
是否正在尝试从NB平台应用程序/模块转换表单?
试一试: