Re: How to display image on Button in SwiXML at runtime
masukomi <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
It's not an issue of SwiXml it's a Swing issue.
SwiXml is only a means of generating Swing objects. Any problems with
display are a result of how Swing Works. The only time a problem has
anything to do with SwiXml is when it claims to have a problem
rendering the xml. Otherwise it's time to get a book on Swing.
-Kate Rhodes
Open source consultant & Java developer
http://www.masukomi.org
On Jul 19, 2004, at 1:19 AM, Bharat Panchal wrote:
> 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
>
>
>
> _______________________________________________
> Forum mailing list
> [email protected]
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>