Desktop Programming

Desktop programming related articles not related to .NET (Java, Python, Ruby etc)

Slot Machine Example in C++

I was bored and that can be a dangerous thing. Like doodling on the phone book while you are talking on the phone, I doodle code while answering questions on DIC. Yeah, it means I have no life and yes it means I was born a coder. During this little doodle I decided to make a slot machine. But not your standard slot machine per say, but one designed a ...

Playing and Thottling Sound Clips in Java

A user recently came up with an interesting project today that frankly I had never really played around with too much... playing sound clips using Java's AudioSystem. The problem he was having was two fold actually. How does one go about throttling a sound (preventing the user from triggering the sound multiple times so that they overlap themselves and causing a scrambled mess that sounds like spirits you would hear ...

Interfaces and Drawing in Java, Hurray!

So I am cruising around the Dream.In.Code boards when I stumble across an interesting post about creating a shapes tool for a graphics Java program. If you are unfamiliar with the shapes tool, the idea is that you click a button, select a shape and then draw the shape onto some window of the program. Select a square, an ellipse or some fancy star and KAPOWY! you have a masterpiece ...

File Chunking and Merging in C++

I got the idea for a file chunking program the other day while I was reading a Ruby article. I thought to myself, why not build a similar utility in C++? The idea of chunking a file (that is, taking a file and breaking it into smaller files) can be a useful utility when dealing with some rather big files. Perhaps if you mix it with some file compression before ...

Inheriting From A Control in Java

I am sure we all love Java Swing. It is not quite as thrilling as the swings we use to play on at the park, but it sure makes our Java applications come alive with a nice rich GUI. We are familiar with the JButton to make buttons, JTextFields to make textboxes and perhaps you have even ventured into using JTables. But maybe some of these controls have not gone ...

Simple Multiplication Table in C++

The board has its ebbs and flows when it comes to programming topics. One day it could be a flood of Java questions regarding an inventory system and the next it could be how to write to a file in C#. A recent question on the board has been popping up over the last couple days with regard to creating a multiplication table in C++. So lets talk a little ...