0

I have a component "graphEditorPane" which extends from JGraph. Now I have this code :

graphEditorPane.setBackgroundComponent(situationLabel);

the problem is that this situationLabel is always aligned to the top left at the background of the pane. Is there a way to set it at the center of(the background of) the pane?

voidMainReturn
  • 3,339
  • 6
  • 38
  • 66
  • http://www.jgraph.com/ org.jgraph.JGraph – voidMainReturn May 23 '13 at 01:00
  • Have you tried setting the Layout of the Pane in question to `GridBagLayout` with no `GridBagConstraints (i.e. default values as it is)`, then whenever you add something to this pane, it will be added to the `CENTER`. Using the line you used. Might be that can work too. – nIcE cOw May 23 '13 at 01:18
  • What version? I just upgraded from 1.7 to 1.13, and I can't find `org.jgraph.JGraph`. – trashgod May 23 '13 at 01:20
  • 1
    I don't see it [here](http://www.jgraph.com/jgraphdownload.html). – trashgod May 23 '13 at 01:23
  • oh my bad, I am not sure which varient of 1.6 it is. It's added by some of my team member. – voidMainReturn May 23 '13 at 05:59
  • 1
    The current JGraph architecture (JGraphX) would have been JGraph 6.x if we'd continued the old numbering. If you have any org.jgraph packages you're using JGraph 5-, which we stopped developing several years ago (v5.x, that is). Still, not sure about v1.6.5, 1.x is over 10 years old... – Frodo Baggins May 23 '13 at 11:34
  • Thanks for the info david. Can you answer my question about aligning background component ? – voidMainReturn May 23 '13 at 21:37

0 Answers0