Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why can't I access JTextField form particular function?

807588Feb 9 2009 — edited Feb 9 2009
Hi there,

I have these both functions:
private void changeKonfig(Locale loc){

    spra = loc;
    System.out.println("spra: " + spra);
    ResourceBundle bundle =ResourceBundle.getBundle("Texte",loc);
    Enumeration<String> e=bundle.getKeys();
    while(e.hasMoreElements()){
        String k=e.nextElement();
        String v_s=bundle.getString(k);
        UIManager.put("DefaultText."+k,v_s);
    }
    updateComponents();
    pack();
}

private void updateComponents(){
    Enumeration<JComponent> e=v.elements();
    while(e.hasMoreElements())
        e.nextElement().updateUI();
}
Can anyone tell me why I always get an NullPointerException when I try to access my "display" within these two functions? Anywhere else is no problem ...

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2009
Added on Feb 9 2009
11 comments
116 views