Can i insert a JPEG picture into my application with out import javax.swing.*; ????? or is where a way to do that with out import javax.swing.*; ???

Hi everyone

The direct answer would be a no.
Why would you want to do this? Maybe you could enlighten me

Richard West

Long answer:
It all depends on what you want to do with it.
You can certainly CREATE an image object of some 3rd party library without explicitly importing Swing, and probably manipulate it as well using that same library.
You can then probably save it again as well.

You WILL however most likely have a hard time showing it on screen (unless you use some other GUI framework like SWT).
That other library may well import Swing classes itself of course.

Short answer:
Of course you can, just explicitly import all the classes you need instead of importing the entire package ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.