Search Result

Collapse
6 results in 0.0031 seconds.
Keywords
Members
Tags
static
  •  

  • AlarV
    started a topic Java GUI Static component, NullPointerException
    in Java

    Java GUI Static component, NullPointerException

    Hey everyone, I created a GUI project, where I'm using a JTree. When it's created everything is ok, but in my run() method when I call it i get a nullPointerExce ption. Here is the code.
    Code:
    treePanel = new javax.swing.JPanel();
    DefaultMutableTreeNode top =
            new DefaultMutableTreeNode("blah");
            mytree = new javax.swing.JTree(top);
    javax.swing.GroupLayout treePanelLayout = new javax.swing.GroupLayout(treePanel);
    ...
    See more | Go to post
    Last edited by AlarV; Jan 7 '11, 10:11 AM. Reason: additional code

  • How to use the file name of a web page inside the code?

    The following code is in a file called Dog_features.ht m

    Code:
    document.getElementById('MyDiv').innerHTML = "<iframe src='Dog_Page1.htm'></iframe>";
    Is there a way to replace the word Dog in the code with a variable which resolves to the first word in the page's file name? e.g.

    Code:
    document.getElementById('MyDiv').innerHTML = "<iframe src='Animal_Page1.htm'></iframe>";
    ...
    See more | Go to post

  • theBNich
    started a topic Initializing static arrays with enum indices
    in C

    Initializing static arrays with enum indices

    Hi, I currently have an enumeration in class Lexer:

    Code:
    enum lexType {
    
        /* token keywords */
        lexIF, lexTHEN, lexWHILE, lexDO, lexBEGIN, lexEND, lexELSE, lexPROGRAM,
    
        ...
    
        /* used for array iterations */
        lexENUMSIZE
    };
    I have an array used to get the string representations of these types:

    Code:
    const char* lexTypeNames[lexENUMSIZE
    ...
    See more | Go to post

  • avi05
    started a topic Scope error
    in C

    Scope error

    void func1(void)
    {

    strans obj;\\\\struct
    unsigned int i,ix;
    ix=1;

    if (a>0)\\\\\\\\\\ \\\a is global int
    ix=a;

    for (i=ix;i<5;i++)
    {
    func2(i,obj);
    \\\\\\\\\\\\\\\ \\\\\\\i value here i =1 ok
    func3(obj);
    \\\\\\\\\\\\\\\ \\\\\\\ func3 ok
    \\\\\\\\\\\\\bu t after this func3 call i value===0\\\\\e rror
    \\not making any change to or passing address...
    See more | Go to post

  • Cristo4
    started a topic Events with static functions
    in .NET

    Events with static functions

    I have a class that is able to detect a global key press. However, I don't seem to be able to create a working event that notifies the Form1 of a global keypress.

    The function "HookCallba ck" is static and for some reason it does work to the point of " MyAKeyWasPresse d(int vkKeyCode)" displaying it's 2 messageboxes but the function in Form1 doesn't get fired and displays no messagebox.

    What do I do...
    See more | Go to post

  • john_doe9
    Guest started a topic Javascript STATIC VARIABLE?

    Javascript STATIC VARIABLE?

    is there a way to declare static variable in a function like so?

    function foo(){
    static count;

    count++;
    }

    Thank you....
    See more | Go to post
Working...