?
Solved

null pointer

Posted on 2006-04-10
6
Medium Priority
?
167 Views
Last Modified: 2010-03-31
int cols = d.listOfImages.size() ;
       
System.out.println("cols "+cols); <<<<<<<<< prints out 2
       
imagePanel.setLayout( new GridLayout( 1, cols ) ) ;


whats wrong?
0
Comment
Question by:ellandrd
  • 4
  • 2
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 16421260
Maybe the imagePanel is null. Please post full stack trace
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16421277
ive declared it like this:

private JPanel imagePanel, infoPanel = new JPanel();

is this legal?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 16421295
It won't initialize imagePanel.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Author Comment

by:ellandrd
ID: 16421333
OK
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16421346
(but it's legal)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16421366
:-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question