RE: Path Files
Title: RE: Path Files Use the following construct: ImageIcon image = new ImageIcon( getClass().getResource( "images/file_close.gif" ) ); This construct will find resources that are in the classpath. Suppose this code is in a class in a package com.mycompagny.application, then you need to put the image in the directory com/mycompagny/application/images. This is because the getResource() method looks relative to the current package you are in. Suppose you want to use the same image in a class in the package com.mycompagny.somepackage, but want to keep the image in the same location, then you can refer to it using: ImageIcon image = new ImageIcon( getClass().getResource( "/com/mycompagny/application/images/file_close.gif" ) ); Notice the slash (/) at the start! By using that the package level you are currently in, is not taken into account. If you would leave out the slash before the com, then image would be searched in the directory com/mycompagny/somepackage/com/mycompagny/application/images regards, Wim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: dinsdag 17 februari 2004 12:39 To: [EMAIL PROTECTED] Subject: Path Files In my program I'm using ImageIcon for the buttons and I had this code Action actClose = new AbstractAction("Close", new ImageIcon("images/file_close.gif")){...} This works if I'm in the correct directory, but if I'm not the images are not found. What is the correct way to do the previus code? Thanks Marcos ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing - - - - - - - - DISCLAIMER - - - - - - - - Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
Path Files
In my program I'm using ImageIcon for the buttons and I had this code Action actClose = new AbstractAction("Close", new ImageIcon("images/file_close.gif")){...} This works if I'm in the correct directory, but if I'm not the images are not found. What is the correct way to do the previus code? Thanks Marcos ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
RE: listview question.....
Hi, I think what you are talking about is similar to JList in java. Please refer java API for this. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jessamine Sent: Tuesday, February 17, 2004 2:11 PM To: [EMAIL PROTECTED] Subject: listview question. Hi, I'm trying to make a java application and I was just wondering if java has a ListView fuction similar to that of VB? I've been trying to find some sources in the net but have come up with nothing useful. Would anyone know anything about this? Thanks, Jessamine __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
RE: listview question.....
Title: RE: listview question. Do you mean JList? More info on Swing: http://java.sun.com/docs/books/tutorial/uiswing/ -Original Message- From: Jessamine [mailto:[EMAIL PROTECTED]] Sent: dinsdag 17 februari 2004 9:41 To: [EMAIL PROTECTED] Subject: listview question. Hi, I'm trying to make a java application and I was just wondering if java has a ListView fuction similar to that of VB? I've been trying to find some sources in the net but have come up with nothing useful. Would anyone know anything about this? Thanks, Jessamine __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing - - - - - - - - DISCLAIMER - - - - - - - - Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
listview question.....
Hi, I'm trying to make a java application and I was just wondering if java has a ListView fuction similar to that of VB? I've been trying to find some sources in the net but have come up with nothing useful. Would anyone know anything about this? Thanks, Jessamine __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing