Problema ao renomear variaveis no NetBeans

7 respostas
F

estou com um problema, e nao sei como resolver… na IDE NetBeand 6.9, quando renomeio uma variavel isso gera um erro…

Exception in thread "AWT-EventQueue-0" java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key QuickConfig.jTextField12.text at java.util.ResourceBundle.getObject(ResourceBundle.java:374) at java.util.ResourceBundle.getString(ResourceBundle.java:334) at org.openide.util.NbBundle.getMessage(NbBundle.java:629) at Eletroeste.Integro.Telas.QuickConfig.initComponents(QuickConfig.java:627) at Eletroeste.Integro.Telas.QuickConfig.<init>(QuickConfig.java:65) at Eletroeste.Integro.Telas.Principal.novoLevante(Principal.java:1219) at Eletroeste.Integro.Telas.Principal.jButton13ActionPerformed(Principal.java:874) at Eletroeste.Integro.Telas.Principal.access$500(Principal.java:52) at Eletroeste.Integro.Telas.Principal$6.actionPerformed(Principal.java:582) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key QuickConfig.jTextField12.text at java.util.ResourceBundle.getObject(ResourceBundle.java:374) at java.util.ResourceBundle.getString(ResourceBundle.java:334) at org.openide.util.NbBundle.getMessage(NbBundle.java:629) at Eletroeste.Integro.Telas.QuickConfig.initComponents(QuickConfig.java:627) at Eletroeste.Integro.Telas.QuickConfig.<init>(QuickConfig.java:65) at Eletroeste.Integro.Telas.Principal.novoLevante(Principal.java:1219) at Eletroeste.Integro.Telas.Principal.jButton13ActionPerformed(Principal.java:874) at Eletroeste.Integro.Telas.Principal.access$500(Principal.java:52) at Eletroeste.Integro.Telas.Principal$6.actionPerformed(Principal.java:582) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

alguem tem alguma luz?

Obrigado.

7 Respostas

ViniGodoy

O que tem na linhas linhas 65 e 627 do arquivo QuickConfig.java?
E na linha 1219 do Principal.java?

Provavelmente lá você está tentando fornecer o nome de um recurso de internacionalização que não existe.

F

Olá, Vini...

Acredito que não...

// linha 1219 do Principal,  uma chamada com parente e modal...
new QuickConfig(this, true).setVisible(true);

...

// linha 65 do QuickConfig, a chamada da função de init  do proprio netbeans
        initComponents();

...

// o componente em si, que eu renomeio e acaba dando os erros citados, 
 jTextField10.setText(org.openide.util.NbBundle.getMessage(QuickConfig.class, "QuickConfig.jTextField12.text")); // NOI18N

// eu renomeei usando o "click direito>alterar nome da variavel

Ja to com a cabeça explodindo... Alguma ideia?
Obrigado...

ViniGodoy

Então, o erro está no fato dele não encontrar o Resource Bundle associado a String “QuickConfig.jTextField12.text”.

Você tem essa String no seu arquivo de internacionalização?

F

Como posso verificar e corrigir isso? Oo

Abraço.

ViniGodoy

Aí eu sei lá, se nem você entende a organização do seu próprio projeto, não tem como eu entender também, hehehehe…

F

excelente resposta…
hsuahsuash… acho que meu topica não se encaixa em “Java básico” e sim “java newbie” … to fudido…

vlw xD

ViniGodoy

É duro. Esse código aí foi a IDE que montou para você? Pq usar um Resource Bundle e internacionalização não é recurso de newbie. Tem que saber certinho o que tá fazendo, onde os arquivos tão sendo gravados e como o recurso funciona, senão vc se perde mesmo.

Criado 2 de setembro de 2010
Ultima resposta 2 de set. de 2010
Respostas 7
Participantes 2