User Profile

Collapse

Profile Sidebar

Collapse
Lost Prophet
Lost Prophet
Last Activity: Apr 2 '08, 08:49 PM
Joined: Mar 19 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Oh sorry. The error was in a different part. I put print statements in other areas and all works fine but in the ComplexScript class the NullPointer is in...

    Code:
    System.out.print("  " + intMap[x][y] + "   ");
    Thanks for the help and suggestion though :-D
    See more | Go to post

    Leave a comment:


  • Two classes below to test the passing of the array from one class to another, its all working but the array in ComplexScript comes out null (so a nullPointerExce ption. This is furthest I have got with it but dont understand why its doing it as I have set the code up in the exact same way that the code was in the workbench that I produced (and that worked). Any pointers?

    Code:
    class ComplexScript
    {
        public ComplexScript script;
    ...
    See more | Go to post

    Leave a comment:


  • I did this but then the array didnt become available to other methods or classes so thought it would need the constructor or some kind of return value. I'll try again anyway and reply to this if I have any problems with it again...
    See more | Go to post

    Leave a comment:


  • All I need in every element is a 1, 2, 3 or 4 so an int but im confused by the above. I used notation from a past example and think that I have got the wrong idea from it

    Whenever I try certain things I get different errors so im confused...
    See more | Go to post

    Leave a comment:


  • 2D Array population and possible Access Control

    Hi

    I have the below code which is to generate a 2D Array... The problem is that I need to populate it by part of array... not by complete array.

    For example...
    map[1][0] = 1;
    map[1][1] = 1;
    map[1][2] = 1;

    map[3][5] = 2;
    map[3][5] = 2;
    map[3][5] = 2;

    map[6][5] = 3;
    map[6][6] = 3;
    map[5][5] = 3;

    Whenever I am trying to populate...
    See more | Go to post

  • DONE... and it was soooo simple... For future reference if anyone has a similar I problem I did this...

    DCWorkbenchGUI class in gui package - Added 'this' as a parameter into the Assistant Advice method in the ReportData class in the report package
    Code:
        
    private void assistantAdviceMouseClicked(java.awt.event.MouseEvent evt) 
        {         
            report.assistantAdvice(this);
        }
    ...
    See more | Go to post

    Leave a comment:


  • Many other classes within the script package refer to the report package so 'report' needs to be populated shortly after the gui is generated at the latest.

    I'll take a look into using the dummy methods

    I now have just the one NullPointerExce ption in...

    Code:
           
    if(flagPolicyChanged)
    {
                String Probabilities = ("Changing the Access Policy to: \n" +
    ...
    See more | Go to post

    Leave a comment:


  • it does seem strange but this is the set-up...

    The ReportData class calls upon a part of the DCWorkbenchGUI class in the gui package to create a dialog box

    The DCWorkbenchGUI class calls upon a part of the ReportData class in the report package using actionlisteners to know when the user requests the information that the ReportData generates

    The aim of the project was to seperate two environments which...
    See more | Go to post

    Leave a comment:


  • I saw that while trying to work around it a few days ago. The problem is changing this generates what appears to be a worse situation...

    Code:
                //initialise the gui, passing the script and report data
                gui = new DCWorkbenchGUI(this, report);
                
                report = new ReportData(gui, this);
    putting them that way round means that 'report' is null in DCWorkbenchGUI but putting...
    See more | Go to post

    Leave a comment:


  • Various lines, but it depends what part of execution it is at. I have a button (Assistant Advice) which it errors on...

    DCWorkbenchGUI Class in gui package - report is null
    Code:
    .
    .
    .
    report.assistantAdvice();
    .
    .
    .
    ReportData class in report package - gui is null
    Code:
         
    public void reportInfo()
    {
    .
    .
    .
    .
    ...
    See more | Go to post

    Leave a comment:


  • Lost Prophet
    started a topic Null Pointer - Tried to resolve... cant :-(
    in Java

    Null Pointer - Tried to resolve... cant :-(

    I posted this NullPointerExce ption error a week ago. Ive made progress as now parts of it are being populated. 'report' all throughout the other non-listed classes is being populated. 'gui' all throughout the other non-listed classes is being populated too. 'report' in DCWorkbenchGUI is not being populated and 'gui' in ReportData is not being populated. Both of these are the problems and I have tried everything to get them to work. Any help would...
    See more | Go to post

  • Lost Prophet
    started a topic Enabling and Disabling the Button
    in Java

    Enabling and Disabling the Button

    I have a problem. I have code that generates a GUI. This is the first thing that the application does.

    I want to incorporate a button, that when information is available becomes enabled but when information isnt available is disabled.

    Using the buttonname.setE nabled(false) does not work. It initially does but the button never becomes enabled. Ive tried using various structures of where I have placed the buttonname.setE nabled(true)...
    See more | Go to post

  • Lost Prophet
    started a topic NullPointerException Error
    in Java

    NullPointerException Error

    Hi

    Im having a problem with some code. Originally, the application was set into three packages (script, gui and control). I have changed is so there is a fourth called 'report'. Whenever I call upon anything in the report package though, there is a NullPointerExce ption for the 'report' variable (which identifies the location of the report. The below part is where the problem occurs:

    private void injuriesMouseCl icked(java.awt. event.MouseEven t...
    See more | Go to post

  • Lost Prophet
    started a topic NullPointerException Error

    NullPointerException Error

    Hi

    Im having a problem with some code. Originally, the application was set into three packages (script, gui and control). I have changed is so there is a fourth called 'report'. Whenever I call upon anything in the report package though, there is a NullPointerExce ption for the 'report' variable (which identifies the location of the report. The below part is where the problem occurs:

    private void injuriesMouseCl icked(java.awt. event.MouseEven t...
    See more | Go to post
No activity results to display
Show More
Working...