This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Custom controls or not?" Watch "Custom controls or not?" New topic

Custom controls or not?

Chaz Branham
Ranch Hand

Joined: Apr 04, 2013
Posts: 53

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.


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10769

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
Second would be to use something ready made like 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: 53

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:
subject: Custom controls or not?
It's not a secret anymore!