Displaying images

How to display images in a servlet

Page 1 of 1

1 Replies - 587 Views - Last Post: 11 August 2009 - 04:15 PM Rate Topic: -----

#1 baby_milo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 09-August 09

Displaying images

Post icon  Posted 11 August 2009 - 04:00 AM

Quote

What method should be used in order to display images in the servlet?

Is This A Good Question/Topic? 0
  • +

Replies To: Displaying images

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8334
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Displaying images

Posted 11 August 2009 - 04:15 PM

put your image in an ImageIcon

http://java.sun.com/.../ImageIcon.html

and then use that ImageIcon as a constructor for a JLabel

http://java.sun.com/...ing/JLabel.html
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1