This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to display in swing?  RSS feed

 
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

 
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
 
Rancher
Posts: 42975
76
  • 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: 42975
76
  • 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.
 
Rancher
Posts: 2907
18
  • 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.
 
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...
 
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?
 
Sheriff
Posts: 21330
87
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.
 
No holds barred. And no bars holed. Except this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!