Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘AWT paint’

Rubber Banding : AWT Drawing – Part 5

Rubber Banding Issue - AWT Line Drawing

rubber band cut from its circular shape as a line. Hold one end of a rubber band between left thumb and left index finger and hold other end between thumb and index finger of right hand. Now, keeping your left-hand stand still, move the other end of the rubber band on your right hand. You can see a line stretching. While drawing this aid the user to see how their drawing primitive (Say Line, Rectangle, circle) looks while they still drag the mouse.

In this example, we will use this rubber banding technique to draw line and rectangle. The user should first place a check mark on the rubber band checkbox and then pick either line or rectangle as drawing mode. Now, we will proceed with the example.

Continue Reading →