Nitin Surana wrote:I have already posted an example for something related to what you are trying to do. Here is the example link
http://www.onlinexamples.com/showfullexample.action?idexamples=81&title=Display%20Image%20In%20Jlabel%20Within%20A%20Jpanel
Hope so this will help.
SCJP
Visit my download page
How I implement that code into netbeans? He dont alow me to edit generated code, so that is a bit problem, if i try to import something i got error on startup and then is bad code. :/
Edmund Petrof wrote:Ok what program to use? What you suggest?
Whit netbeans I make some nice application, wroking nicly just image is my problem. And I am not good at Hand code, Still a bit confused about bunch of stuff, but i got books and reading it daily, some books are for netbeans and other is for java, difrance is big. Like reading two difrante programing language. In netbeans is all about propertis and adding some words, in java all can be typed in the notpad.
So leave netbeans and go notpad? or some other program what you will recommend?
To every Tunnel there is always a way out
So keep Trying...
Digen Mahara wrote:use eclipse IDE the best for Java Programmers
Digen Mahara wrote:further your Image problem can be solved:
You can use a JPanel and use the paintComponent() method and drawImage() method to draw an image on the background and hard luck there is no way you can do this in Netbeans try it in Eclipse
luck, db
There are no new questions, but there may be new answers.
Edmund Petrof wrote:
So basicly i need to drop netbeans generated code and code all by my self?
Joanne
To view the generated code:
In the GUI Designer, click the Source tab.
Scroll down to the line that says Generated Code.
Click the plus sign (+) to the left of the Generated Code line to display the code that the GUI Designer has generated.
The key line is the following:
Since you have used the property editor for jLabel1's Icon property, the IDE has generated the setIcon method. The parameter of that method contains a call to the getResource() method on an anonymous inner class of ImageIcon. Notice that the generated path for the image corresponds with its location in the application's package structure.
Consider Paul's rocket mass heater. |