How to display image on Button in SwiXML at runtime

"Bharat Panchal" <[email protected]>
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Hi,
I am using SwiXML and using table.
I am preparing table's model using following code.
I am adding

Object[][] tableData = new Object[rows][columns + extraColumns];
for(int i=0; i<rows; i++){
  for(int j=0; j<columns; j++){
	  tableData[i][j] = d[i][j];//d[][] already contains some data
  }
  tableData[i][columns] = new JButton(new ImageIcon("edit.gif"));//Edit
  tableData[i][columns+1] = new JButton(new ImageIcon("view.gif"));//View
  tableData[i][columns+2] = new Boolean(false);//Delete check box
}

I am wondering that the edit and view buttons get displayed without any
image. There is not location or path not found issue for images.
Even, If I don't use image and just say new JButton("Edit"), it doesn't
display the button text.

Can anyone tell me where am I wrong?
Is this the correct way to create model in order to display images on button
in SwiXML?

Thanks.
Bharat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.