HELP PLEASE!!! Graph Alignment!!
Hi!!! I'm a new user in this forum and excuse me for my english..I'm just moving the first step with java and I have to realize a project with "JUNG2" but there is something that I can't explain. I have to do a graph that use many imeges on its vertex. Everything is ok in the code and it run perfectly. I just wanna set the alignment "center" of my graph and put all my buttons to the bottom of my frame.. I've tried many times but it doesn't work.. I'll post you my code so you can understand better!!
Attachment 1660Attachment 1661
the program create a graph with my CircleLayout but everytime is on the top and on the left of my frame.. I want to put it into the center of my display!!!!! But if i use the same code like for my frame setting:
//SET ALIGNMENT "CENTER" TO THE FRAME
frame.setLocation(new Point((dimension.width - frame.getSize().width) / 2,
(dimension.height - frame.getSize().height) / 2 ));
IT DOESN'T WORK!!! why??
I hope you understand my problem and i hope you can help me!!!!