JGraphX is an open source Java Swing Component. It is the architecture written after JGraph 5, but not named JGraph 6 because it is rewritten and the API is entirely different.
Questions tagged [jgraphx]
182 questions
3
votes
1 answer
How to make the edges of needed form in jgraphx's graph?
My graph contains rectangular vertices with single outgoing edge and the vertices of rhombus shape with two outgoing edges.
I'm using mxCompactTreeLayout and mostly everything is ok except that edges of the vertices of the second type look wrong…

Anton Danilov
- 1,246
- 11
- 26
3
votes
2 answers
Undirected Graphs in JGraphX
I try to show graphs in JGraphx.
Everything is fine as long as I use directed Graphs,
but when I try to show an undirected one, its shown
with direction.
The code is from the demo of jgrapht.
package org.jgrapht.demo;
import…

Torben Ha
- 45
- 1
- 5
3
votes
2 answers
How do I disable edge selection only in JGraphX?
I'm trying to disable edge selection only in JGraphX. If I call
mxgraph.setCellsSelectable(false);
This disables selection on all cell, not just edges. Is there something like a setEdgesSelectable()?

user3062529
- 87
- 1
- 8
3
votes
1 answer
Progress bar for JGraphX layout
Is it possible to use a progress bar with an mxIGraphLayout? I have a graph that takes a non-trivial time to layout, and I would like the user to be able to see that, yes, something is happening.
Ideally, I would like something that I can…

Troy Daniels
- 3,270
- 2
- 25
- 57
3
votes
1 answer
JGraphX: How can I get a vertex by mouse coordinates? (mouseMoved method)
I have a mouseMoved(MouseEvent e) method with the coordinates e.getX() and e.getY().
Now I want to check if the mouse is over a vertex. Is there a way to do this?
I don't want to check if the cell (vertex) is selected, I only want to check if the…

user1047271
- 311
- 2
- 9
3
votes
1 answer
how to export a graph to svg/graphml
I am little bit stuck on how to export graphs to svg or graphml. Neither the api, examples or threads on forum.jgraph.com did help me until now.
I need to export graphs to both svg and graphml. I got svg to display the nodes and edges even with the…

toasti
- 45
- 5
2
votes
1 answer
Text in vertex isn't centered
When creating a vertex with text in the value it put a couple pixels above the middle. Different font sizes are at different heights. The Text is also smaller than the font size I enter. How would I get the text centered in the cell?
This is the…

Max Ortman
- 49
- 3
2
votes
1 answer
JGraphX : "InvalidDnDOperationException: Drag and drop in progress" when using Swing Node in JavaFX
I want to use JGraphX with JavaFX, but I have a little problem.
Using this code :
import javax.swing.SwingUtilities;
import org.jgrapht.ListenableGraph;
import org.jgrapht.graph.DefaultDirectedGraph;
import org.jgrapht.graph.DefaultEdge;
import…

Martelement
- 21
- 1
2
votes
0 answers
Graph not rendering in JavaFX on startup under Java 11
The issue I'm having is that the mxGraph object does not load correctly on startup. It requires me to click a cell inside of it for it to appear, and even then it does not reveal the entire graph, just the cell that was clicked. In order to reveal…

Dan Beavis
- 31
- 3
2
votes
0 answers
JGraphx change color of vertex
I started with JGraphX a few days ago and already did some nice things.
I would like to programmatically change the color (and maybe other style properties) of an existing vertex (i.e. that was already created before) upon some specific events. How…

Jozef Aerts
- 21
- 3
2
votes
0 answers
Tools to visualize a Spark GraphX graph with 800 million vertices and 2 billion edges
We have a large graph processed with Spark GraphX having about 800 million nodes and 2 billion vertices.
Are there any tool which allows visualization of the data. The data is currently stored in s3 and its capacity is about 600 GB. I checked into…

pjesudhas
- 399
- 4
- 13
2
votes
2 answers
How to update a JGraphT view after adding a vertex?
I've created a graph using the JGraphT library:
g = new ListenableUndirectedWeightedGraph (MyEdge.class);
graphAdapter = new JGraphXAdapter(g);
layout = new…

Michał Urban
- 113
- 12
2
votes
1 answer
Prevent node overlap in JGraphX
I use components with significant size for vertices (by overriding mxGraphComponent.createComponents), and using mxOrganicLayout or mxFastOrganicLayout makes them overlap. mxHierarchicalLayout doesn't with my current graphs, but I am not sure…

Alexey Romanov
- 167,066
- 35
- 309
- 487
2
votes
1 answer
How can i draw a graph with multiple edges on a single vertex (e.g. allowing loops)?
I'm using JGraphX to draw a graph. I need to draw a graph with multiple edges (joining two vertices) and create a loop on the vertex. Is it possible in JGraphX?
For example:

kevinn13
- 21
- 2
2
votes
0 answers
Groups changing coordinates
I have assigned a specific set of coordinates to create a Group Cell in JGraphX. When I create two vertices to be placed in the group and then group it in the parent cell , the x and y coordinates of the group cell change infact are reduced , due to…

span
- 75
- 6