Link to home
Start Free TrialLog in
Avatar of ellandrd
ellandrdFlag for Ireland

asked on

null pointer

int cols = d.listOfImages.size() ;
       
System.out.println("cols "+cols); <<<<<<<<< prints out 2
       
imagePanel.setLayout( new GridLayout( 1, cols ) ) ;


whats wrong?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Maybe the imagePanel is null. Please post full stack trace
Avatar of ellandrd

ASKER

ive declared it like this:

private JPanel imagePanel, infoPanel = new JPanel();

is this legal?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK
(but it's legal)
:-)