The ability to transfer information by dragging data from one component to
another has been around since the development of the graphical user
interface. Over the years drag-and-drop has gone from a cool feature to a
required piece of most user interfaces. Most users expect to be able to drag
objects between fields, windows, or folders and have some action occur.
Drag-and-drop is even used to open applications by dragging a file to an
application icon.
For a Java developer creating user interfaces it's no longer a question of
whether drag-and-drop should be used but of how much. Java provides a set of
classes for implementing the drag-and-drop interface. While it's not overly
complex, implementing it in a complex GUI with a number of drag sources and
drop targets can be tedious and error-prone. In this article, I develop an
abstract DnDHandler class that takes care... (more)
Testing is usually an afterthought in the development process. The
developer's main focus is to design and write code.
Of course, the developer runs the program many times during development to
make sure the code runs and produces the expected results; however, this
testing has no real structure and the main goal is to ensure the program runs
at that moment. Most developers rely too much on QA or the end user to make
sure the program works properly and meets requirements.
Extreme Programming has taken the "build a little, test a little" philosophy
to a new level by requiring that... (more)