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
1
vote
0 answers
jgraphx Layout algorithms explanations
In order to understand better how layout algorithms works in Jgraphx, I've developed a little example to display my issue.
1) In this first example I create a node with two nodes connected, then apply layout algorithm, all works as expected, because…

Vokail
- 630
- 8
- 27
1
vote
0 answers
How to change the edge routing style in a JGraphX graph using mxCell class?
How can I change the routing style of the edges using the mxCell class?
for (mxCell cell : cells) {
mxGraph.setCellStyle("edgeStyle=" + edge style + ";", new Object[] { cell });
}
Can I have something like that?

roniko1994
- 51
- 8
1
vote
0 answers
(JGraphX) Set vertex label width
I create a vertex and put a value in it, showed as the vertex label. I need to make it with a tall height label and at the same time, small width, but when I set the "fontSize=44" at the vertex style, it also changes the width (obviously) of the…

Fagundes
- 119
- 10
1
vote
1 answer
JGraphX Graph not displayed in JPanel
I am building a Java Application in NetBeans that involves a GUI, through which I am trying to display a graph (representing an automata/finite state machine) using JGraphX. For some reason that I can't figure out, when I run the program, the graph…

Thomas M
- 131
- 1
- 1
- 7
1
vote
1 answer
Insert vertex inside a Graph
I want to add a new vertex inside an existing graph.
So I created a new cell and i'm attempted to reconnected my edge but my graph doesn't update (for the edges)
This is my code :
mxGraph graph = editor.getGraph();
mxCell selectedElt =…

amandine
- 17
- 6
1
vote
1 answer
How to automatically invoke an organic layout in JGraphX
I'm using the JGraphX library and am trying to perform an automatic layout using the mxFastOrganicLayout:
import javax.swing.JFrame;
import com.mxgraph.swing.mxGraphComponent;
import com.mxgraph.view.mxGraph;
public class FastOrganic extends JFrame…

Claire Harding
- 86
- 8
1
vote
2 answers
How to change color of selected connection in jgrapht or jgraphx?
I'm visualizing a graph in a java swing application using jgrapht/jgraphx.
By default the connections (the arrows that point from one node to an other) between 2 nodes are rendered in light blue. When I select a connection by clicking on it, the…

kibu Kuhn
- 81
- 5
1
vote
1 answer
Use dotted line for edges in JGraphX
I've been using JGraphX for displaying a static graph on a JPanel. So far I've had no problems with it. I drew the graph, customized the style, even added vertex listeners for a custom graph colorization.
Nontheless I need some of my graph edges to…

fanulis
- 175
- 1
- 1
- 9
1
vote
1 answer
disable connection of actual vertex on JGraphX
I need to disable connection of actual vertex if edges of vertex >= 2
if(graph.getModel().getEdgeCount(cell)>=2){
graphComp.setConnectable(false); // but for actual cell, not for all vertexes
}
How can I do that?

Katka
- 11
- 1
1
vote
1 answer
Selection event listener on graph
I would like to implement a selection event listener on a graph to change the style of the selected vertices.
I have tried the following:
String[] events =
{mxEvent.ADD, mxEvent.ADD_CELLS, mxEvent.ADD_OVERLAY, mxEvent.AFTER_PAINT,
…

OOP
- 293
- 4
- 16
1
vote
0 answers
How to render custom vertex (graph node) with Graph/GraphX?
How to render custom vertext with Graph/GraphX?
Also would like to to reuse swing renderers, so would like to draw as swing component.

Suzan Cioc
- 29,281
- 63
- 213
- 385
1
vote
1 answer
How to disable visual graph (interconnection) modifications in JGraphT/JGraphX?
I have visualized relationships in my program with JGraphT's JGraphXAdapter.
Unfortunately, I need to allow user only visual modifications of the graph, i.e. moving/resizing nodes. But he still can edit something, despite the fact I disabled…

Suzan Cioc
- 29,281
- 63
- 213
- 385
1
vote
1 answer
Simple grid layout in java
So I need an automatic grid layout algorithm with "orthogonal" edges of some Java objects.
Something like this.
I'd be given some matrix from which I will create a graph instance (in Eclipse) and my output is layout of that graph (it would be very…

quark27
- 21
- 3
1
vote
0 answers
Combining tree and hierarchial layout in jgraph
I am trying to combine horizontal tree and hierarchial layout. I want the upper half of my graph to be tree layout and draw horizontally and teh lower half hierarchial layout.
I tried adding tree layout and hierarchial layout in the same…

shoukatghouse
- 49
- 7
1
vote
0 answers
Why are my curved edges not updating correctly?
I'm trying to customize a layout of JGraph. I want to create curved edges, but I have a problem. Every time I create a group of vertex on JGraph, and I am firing an event to update this graph, the edge is missing points compared to the previous…

albsilva
- 121
- 6