Re: Drawing line from one JButton to another JButton
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 Jul 2007 13:26:23 GMT
On Thu, 19 Jul 2007 01:28:20 -0700, Chanchal
<chanchal.jacob@xxxxxxxxx> wrote, quoted or indirectly quoted someone
who said :
I'm developing some thing like an electronic circuit designer. I have
a number of JButtons placed programatically on a JPanel. Now I need to
draw lines between pairs of JButtons by dragging mouse from one button
to another one. Please advice on how such a thing can be implemented.
Also i should be able to delete such lines drawn. KIndly advice
Thanks in advance.
See http://mindprod.com/jgloss/pane.html
The trick might be to draw the lines on a different pane. You let the
layout manager place the buttons, then you ask the buttons where they
are with getLocation.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.
- References:
- Drawing line from one JButton to another JButton
- From: Chanchal
- Drawing line from one JButton to another JButton
- Prev by Date: Re: Drawing line from one JButton to another JButton
- Next by Date: Re: Clipped image when g.drawImage(img, -3, -4, this)
- Previous by thread: Re: Drawing line from one JButton to another JButton
- Index(es):
Relevant Pages
|