Answer the question
In order to leave comments, you need to log in
How to add image to jFrame?
Good afternoon everyone.
I have drawn a program interface in the NetBeans form designer. More specifically, a window similar to some "About" windows. Also I want to "fasten" a picture in this window. Tried with jLabel but it doesn't scale the image. And I need that when the window is resized, the image size also changes (not the window background, but a separate object, like jLabel, jTextArea, and other Swing objects).
I'm a beginner in NetBeans, and in Java too, so I'm sorry in advance if I ask stupid questions))
By the way, I read an article here Adding an image to a JFrame
Created a jPanel subclass, as written in the article, but did not understand how to declare it in my form. Because NetNeans won't let me insert a "foreign" object. Maybe somehow you need to configure NetBeans itself?
Answer the question
In order to leave comments, you need to log in
You write the code with pens, without forms! And how can you help without the code?
https://netbeans.org/kb/docs/java/gui-image-displa...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question