Original Post – from Stepya.com
A lot of times when working on a big feature things can be overwhelming. Here’s one quick trick to help things more manageable and to do more “thinking before you code”: Make a TODO list.
For example, let’s say you had to make a custom JDialog box that grabs some user input (name, start and end date) for your application. One way to break this down is to think about the steps necessary to do accomplish this task.
* Layout JDialog box
* Fields: name, start date, end date
* Field types: name – String, start date – JSpinner, end date – JSpinner
* Initialize Fields
* Layout fields on box (think about layout managers and sizes … setSize(), setMinimumSize(), setPreferreredSize(), setMaximumSize() are all really useful dependent on which layout manager you chose)
* validate fields (if neccessary)
* Action buttons – JButton for canceling and closing the window and “Add” Button for grabing the users information
….etc . You can go as much in depth or abstract away all of the details that are trivial AND leave out extraneous comments. At the very least this is a short quick method for organizing your thoughts before you code. At the very least, it feels soooo good when you cross something off the list to feel like you’ve accomplished something for the day. CONGRATULATIONS!