• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to display in swing?  RSS feed

 
beata jane
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai
I am doing a project in image processing,
In my project I am just matching a particular image with a set of images….
And those that are similar comes in this following order….
This is the output I got in command prompt but I need to use swings inorder to display all those similar images…
Help me to get through this......

This is the output I got in the command prompt…..

E:\My Project>java Test
Processing........
The Input Query Image is : 36.jpg

**********1.Positive results(original images)****************
S.no Image Name

1. 36

**********2.Top 10 Related Images***********
S.no Image Name

2. 62(image name.jpg)

3. 4

4. 44

5. 8

6. 7

7. 31

8. 48

9. 11

10. 35

 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use JPanel for each Images by overriding the paint method.
 
beata jane
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know how to retrieve the values from a file and do some processing and then making it to display using swing...
please help me to get through this.
 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of image you need to display., JPEG, GIF, DICOM etc..

If you have pixel data, use Graphics.drawImage() method. it will take care of drawing the pixel data on JPanel.
 
beata jane
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its just the image with exttension .jpg and not pixel data
Is it possible to import a file in swing...Help me with an example program.
 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this FAQ has the answer for that
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's an example of how to read an image and display it using Swing: http://www.exampledepot.com/egs/javax.imageio/BasicImageRead.html
 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is also help full webpage
 
beata jane
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to have the swing codings and the void main function within the same codings sir.
please let me know through an example sir.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read the web page Chiranjeevi linked to; it shows how to do that.
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know why everybody suggests doing custom painting on a JPanel. Just use a JLabel to display the image. Read the Swing tutorial and you will find working examples of loading and displaying images.
 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helllo everyone..

Am new Dicom ....
i have created programs to display and split the dicom image and its header and also to list header information also.

the problem is that i need to get files at run time using JFileChooser and display the header data elements(tag data and tag name) using jtable...

here is my code...


please help me...
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ambika Nagalakshmi wrote:Helllo everyone..

Wouldn't we all be better off if you started your own thread on this rather than hijack someone else's?
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it would, since this has nearly nothing to do with the original thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!