File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes swing blob image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swing blob image" Watch "swing blob image" New topic
Author

swing blob image

muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82
good day experts, this code was aimed at displaying image from database but the codes runs and display an empty page.
please help me fix the problem

thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

Are you sure the image is loaded from the database properly? What's the value of bytes?

And why are you using JDesktopPane? Why not simply extend JPanel?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
You should QuoteYourSources: http://www.roseindia.net/tutorial/java/swing/retrieveImage.html.
muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82
i have ammended the code as you said but its still displaying an empty page. just as you said ,is like the image is not loaded properly. So what do i do.
below is the code as being ammended thanks

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

You should start by not catching Exception and then ignoring it. This may very well be causing the problem. The least you should do with any exception you don't want to handle is print its stack trace.
muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82
I have used
but it still display empty page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: swing blob image