aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Custom controls or not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Custom controls or not?" Watch "Custom controls or not?" New topic
Author

Custom controls or not?

Chaz Branham
Ranch Hand

Joined: Apr 04, 2013
Posts: 50

Hello all,

This is my first post here and glad to see there is a forum like this out there. I hope I can make sense in what I am trying to understand/do and any guidance and help offered is greatly appreciated. I have been programming for almost 12 years now but in other launguages and am now programming little tools in java to do certain tasks. Java is so vast I hardly know where to start but here goes.

I am trying to find any information on creating an object that has connection points on it (eg. would be like power point objects) where you can draw lines to or from it. So think of a rectangle/Jlabel that has four connection points that you could draw from or too connecting other jlabels together in some fashion. This really could be done with any type of object I would imagine but I do not understand java's way of integrating or modifying existing objects in this manner visually or functionality wise.

If you as a java programmer needed to produce something like the above would you create a custom control or possibly just extend a control or what? I just need a place to start if anyone has a few seconds to point me in the right direction I would greatly appreacite it.

Thanks


TheChazm
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Welcome to the Ranch!

Way I look at things, this can be done in (minimum) two ways.
One would be to roll out your own solution. You can paint your own shapes, identify nodes, connect those nodes using lines etc. More on how to do this here http://docs.oracle.com/javase/tutorial/uiswing/painting/
Second would be to use something ready made like http://www.jgraph.com/jgraph.html or any other java graphing libraries.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Chaz Branham
Ranch Hand

Joined: Apr 04, 2013
Posts: 50

Thank you so very much for the information. This is exactly what I was looking for! If anyone else has good examples then please continue to post but I am marking the thread as resolved as it does answer my question YAH! WOOT! lol
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom controls or not?