Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7784475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:06:03+00:00 2026-06-01T20:06:03+00:00

Trying to implement an MVC pattern, keep coming back to a NullPointerException . I

  • 0

Trying to implement an MVC pattern, keep coming back to a NullPointerException.

I feel I’m missing a trick when it comes to setting up an area of the GUI which should
replot data based on user inputs. The exception points to this;

display.replot(model.getData(), model.getSamples());

display is an instance of a class which contains a paint method. getData and getSamples are described in the model and are based on setters which should update with user input to the GUI.

I thought the problem may have been with data set originally being null so i provided initial conditions to the model.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:06:04+00:00Added an answer on June 1, 2026 at 8:06 pm

    A NullPointerException means that either you are calling a function on a non-existing (null) object, or a function call can throw that exception deliberately if one of its parameters is null. You need to check which is the case and either put an if guard around it or otherwise ensure the objects are valid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to implement a session-per-request pattern in an ASP.NET MVC 2 Preview
i'm trying to implement a basic mvc pattern for a java web app project
I'm trying to implement MVC 2 RC version, the latest release of ASP.Net MVC
While trying to implement an MVC file upload example on Scott Hanselman's blog. I
I'm trying to implement my first Spring MVC controller, following Spring documentation, some tutorials
I am trying to implement URL Routing for a non MVC application. Here's my
In a Spring MVC 3.1 application I'm trying to implement a remember-me feature (with
I am new to both MVC and Stackoverflow I am trying to implement pagination
My first try of MVC. Am trying to implement a simple example. Inspiration from
I'm trying to get started with the repository pattern and ASP.NET MVC, and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.