JUNG Export editable Graph in a VisualizationViewer into an image [duplicate] - java

This question already has answers here:
Exporting JUNG graphs to hi-res images (preferably vector based)
(4 answers)
Closed 9 years ago.
I have an editable VisualizationViewer inside a GraphZoomScrollPane. After moving and reorganizing the graph I want to save the edited version into a image file.
When I tried using VisualizationImageServer it requires the layout which removes the modifications and set up the nodes to the original layout.
By printing the JPanel into the image, I only get the visible portion and I need the full image to be saved.

I'm not an expert on Jung, but this question seems to provide a workable approach to what you want to do:
Exporting JUNG graphs to hi-res images (preferably vector based)

Related

Draw A Tree Data Structure in Java [duplicate]

This question already has answers here:
How to draw a tree representing a graph of connected nodes?
(4 answers)
Closed 6 years ago.
Given a tree how one could approach to draw the same using Java Swing that what we draw in a simple piece of paper to understand a tree ? i.e. drawing all the nodes an values inside the node circle as well as threads to join the parents with the child and so on .The Structure will be like this :
From https://en.wikipedia.org/wiki/Tree_%28data_structure%29#/media/File:Binary_tree.svg
You can use JavaFX for that:
https://en.wikipedia.org/wiki/JavaFX
http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
That's the newest Java GUI technology!

How to perform gradient effect in Android? [duplicate]

This question already has answers here:
Oval Gradient in Android
(5 answers)
Closed 9 years ago.
I want to perform a gradient effect that shines from bottom of the layout as appear in the following picture. Notice that it is not a regular tag with start colour and end colour because I tried those but I haven't reach to the required solution. Also I don't want to set the background with a picture because I’m concern of quality issues. Please help. Thank you.
You can't do this using XML drawables in Android. I recommend using images.

How to read text from images [duplicate]

This question already has answers here:
Java OCR implementation [closed]
(5 answers)
Closed 9 years ago.
Hey guys is it possible to read text from an image, like how you go to submit a form and it ask you to fill in the text inside image. I want to know if it is possible to read the text inside it. If so, what language?
David Biga
EDIT:
I am not trying to read captcha I was just giving an example of an image with text in it.
It is possible to read text with Optical Character Recognition.
However, CAPTCHAs are designed to thwart this, in order to distinguish humans from computers.

Add Dynamically loading images using for loop in JToolBar [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Issue regarding dynamically loading Images in loop using Java Swing
Can any one tell how I would add images dynamically using for loop in JToolBar. I tried a lot but it didn't work for dynamic loading of images. I want to create ToolBar where I load images in a loop.
JToolBar is particularly well adapted to adding JButton instances each having a distinct Icon, so I would advocate using ImageIcon. Complete examples maybe found here, and more were cited in comments to an answer to your previous question.

background image on a java gui [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to set background image in Java?
I am trying to put a background image on my java gui, and I can't figure out how to do it. I've looked around and tried some code but I can't get it to work. I have the imageicon setup but I don't understand where I'm suppose to put this at. Please help!
Read the section from the Swing tutorial on How to Use Icons for an example of displaying an icon.
Then, depending on your requirement, Background Panel explains how you can then use the JLabel with the icon as a background image.
Could this solve your problem? It's an explanation code which shows how you can put a background-image to a panel :) http://www.java2s.com/Code/Java/Swing-JFC/Panelwithbackgroundimage.htm

Categories

Resources