有一个问题: 只是通过调整一些按钮修改了我的Swing GUI的一点,重新编译...然后:Netbeans的摇摆:变量声明消失
cannot find symbol symbol: variable MachineStatusLabel
多相同的其他对象...
是的,这是我的GUI中的标签,不知道为什么找不到它。生成的代码部分包含通常的东西,如
javax.swing.JLabel MachineStatusLabel = new javax.swing.JLabel();
并定义了一切。但看看Variables declaration - do not modify
-Section,几乎所有的GUI对象都消失了!只有两个左:
// Variables declaration - do not modify
private javax.swing.JLabel statusAnimationLabel;
private javax.swing.JLabel statusMessageLabel;
// End of variables declaration
有没有办法让NetBeans的重建整个GUI到这个生成的代码?不知怎的,GUI对象似乎刚刚被NetBeans的:-(添加申报失踪的对象手动都于事无补搞砸了......事先
谢谢!
帕特里克
我的建议:不要使用NetBeans拖放gui构建器来构建gui,而是用手工编写代码。然后,只有您对代码及其完整性负责。我认为除了最基本的图形用户界面外,从长远来看,手动操作实际上更容易。 – 2011-02-10 17:22:24