![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Ok before I ask my Question let me tell you what the program does. When you load the program two button will appear within the window. You can ckick and drag these buttons anywhere you want on the screen. The code for this is very sinple. The code works perfectly. So its obvious that my question is not to find the error in my code. However I want to extend my code to do the following : (1) I want to add an extra button .. it does not matter where on the screen [ JButton newButton = new JButton() ] (2) When I press this button I want a line to appear between the two moveable buttons ( ie the two buttons are joined together by the line) (3)Now here is the hard part.. Whenever I move either of the two buttons the line stretches so that the two buttons are still connected. Hence the line is like a rubberband and will always connect the two button no matter where they are positioned. Please help in anyway.. any kind of help would be appreciated. Onemust be wondering why I need code for this.. well basicllay am suppose to write the sourse code to smimulate a celluar (GSM) network.
import java.awt.*; class MoveablePics
Replies: |
Sponsored Links
|