• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

NullPointerException thrown when generating SWING GUI

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there folks,
I am currently writing a small application that is used to demonstrate multi threading in a Swing-based interface application.
The Main method initialises an array of objects, a couple of DefaultListModels with another set of assigned objects.
I have then passed these parameters to an instance of another type of GUI class, generated by a simple new() GUIClass call, which incedentally initialises aand displays without exception.
When I try to genrate an instance of the same GUI class from a JButton event in the calling class, I have a NULLPOINTEREXCEPTION thrown. Signs presently indicate that it is being thrown by the parameters passed into the called GUI class.
I have become a little frustrated as I have been able to generate printlyn lists of the contents of the array, DefaultListModels from both the calling GUI class and the called GUI class.
I am at a loss presently and would appreciate some possible pointers, excuse the pun, to any possible solutions.
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martin,
Welcome to JavaRanch. Without seeing some code and the stack trace of the NPE, it's going tough for us to help out. Try posting some code and the stack trace.
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic