Re: Displaying Images



On Feb 19, 12:13 pm, "Sean C." <BrknSh...@xxxxxxxxx> wrote:
....
(images)
...I've tried loading them using a
path-like string, but that doesn't work. I've tried loading them using
getResource() and that doesn't seem to work as well.

I see there being two basic parts to this
problem.
1) getting the path to the images
2) loading and displaying them

If part 1) does not work, part 2)
is moot.

So, I suggest you write up some test code
that focuses on getting a valid URL to
the image (or one of them).

If you cannot get that working, post
your short code (that focuses only on
finding the image) to the group and we
might be able to assist further.

For part 2), there are a number of ways
you might go about loading and displaying
the image, but one way is this..

JLabel imageLabel = new JLabel(
new ImageIcon( theImageURL ) );
parent.add( imageLabel );

Andrew T.

.



Relevant Pages

  • Re: Borland wants to sell Delphi?
    ... the registry - which is half the problem ... that is easily updated while your browser is already running and ... displaying the "application loading" page. ...
    (comp.lang.pascal.delphi.misc)
  • \ in image file path
    ... I found a Ms gdi+ sample "Loading and Displaying Bitmaps." ...
    (microsoft.public.win32.programmer.gdi)
  • Pygtk Image Load Problem
    ... pastebin http://pastebin.com/m490093b3 ... I am having a problem when loading the full screen images, ... displaying a gray line at the bottom of the image as can be seen in ... It is worse on some images than others, but the gray ...
    (comp.lang.python)
  • Re: G-mail LOADING Error
    ... There is a message - LOADING and screen is displaying BLANK. ... Have you ever considered that websites do maintenance and that it may be ... (Most Valuable Microsoft Certified Head Asploder) ...
    (microsoft.public.cert.exam.mcsa)
  • Re: vb 6 MonthView control
    ... the months that are displaying when the form loads the control. ... So if I were loading it today the ... inititally setting a date way in the future and then setting the desired ... Private Sub Form_Load ...
    (microsoft.public.vb.controls)