Posts Tagged "Basics"

Making the Right Choice In Implementation

Time and time again programmers come on the Dream.In.Code board seeking answers to a problem that they know the steps to solve but just can't get those steps to work on the computer. They know they need to add 1 to a value until it reaches 27, but how do you do that? A loop you say? But which one? Sometimes the newbie picks the wrong type of implementation to ...

Introduction to a Java JTree

Monkeys and Koalas are not the only things that climb trees, Programmers do too! But our trees are a bit more virtual. In Java (and many other languages) there is a control known as a Tree or Treeview. It is used to create a hierarchy display much like you see in Windows Explorer in the left hand pane. You can see nodes and how they relate to one another much ...

Avoid Tying Classes to Your Forms

So you have a great class written and you want to integrate it into your project. Whether it be C#, Java, VB even C++ you may have asked yourself "How do I go about getting my class to update my form controls?" or "How do I get the class to change something on my interface or another class?" It is a common question asked on the board and the answer ...

Building Shapes With Loops

From time to time it has been asked how to build standard 2D shapes with simple loops. It could be a rectangle of some sort or a right / equilateral triangle. Maybe even a triangle that is facing the left rather than facing the right. Even the diamond pattern is a good one asked by many instructors around. But why on Earth would instructors ask you to build these types ...

Playing with a ToolStrip Control in C#

Ready for another action packed, fun thrilled entry? In this episode we talk about the Toolstrip control and creating one dynamically through code. Sure we can add one through the toolbox and configure it at design time, but knowing how to create controls and manipulate them at runtime is also great practice. You might be asked many times to create a control and then have it update its appearance as ...

Storing Full Objects In ComboBox/ListBox in .NET

Most beginner and even intermediate level programmers, coming out of languages before .NET, often use comboboxes or listboxes to simply list strings of choices, items etc. Then they go through the headache of detecting a user's choice out of the listbox and fetch information to construct a simple object, possibly displaying that information in other controls related close by. There is an easier way of forming the "master to detail" ...