easy java image Box, my way
Hi there,
I believe that a lot of new comers found it hard to use images in JAVA, especially who came from .Net world. So I decided to simplify things out by providing this simple tool.
I call it imageBox to make it sound like VB Picture box. this imageBox is a hacked version of JPanel.
All what I did, is just overriding paint (Graphics g), after that I force it to load the Image file and draw it on the component itself.
ImageBox is a very useful tool; you may add it to netbeans palette. This allows you to change images from design level from imageFile property. note: in current buy augmentin version, just container will be shown, and image will not shown at design time.
to assign the image file you may need to use URL for the path, cialis tablets 20mg buy generic levitra westernunion online or a string:
getClass ().getResource (“/imgFolder/imgFile.jpg”)
or
“/imgFolder/imgFile.jpg”
note: it is better to include image files with the project source, you diflucan dosage could group them in folder called “img”.
steps to add imagebox into netbeans project:
- create a new project with JFrame
- add imagebox.java to your project
- build your project
- drag imagebox.java on JFrame, it will show a box with “X”
- go properties -> imageFile, set file path as mentioned above.
Feel free to contact me for any help.
download: imagebox(0.0.6)
cheap cheap Amoxil online buy without prescription Drugstore online Ampicillin buy style=”color: #ff0000;”>levitra buy style=”color: #0000ff;”>download: imagebox(0.0.5)
download: imagebox(0.0.3)example
Related posts:
nice component, i just drag it on jframe and it works like magic. still it needs to support design time image rending.