Programming

Java Memorandom- Graphics.drawImage

In paint(Graphics g) call back, use drawImage() to draw an image. It is crucial to specify ImageObserver parameter.

I mistakenly passed a null to the parameter, and the drawing was not done properly. It renders only when any other event forces to repaint. When the parameter was properly set, the rendering happens correctly so that the image shows up from the beginning.

Showing workspace name on Eclipse


When working on Eclipse , sometimes you want to know which workspace you are using. To show the workspace name on the title bar, use the following command-line option.


eclipse.exe -showLocation

How to access COM component within a project

I'm still using Visual Studio 2005 for some C++ development. Thanks to ATL, I can use any COM component with modest amount of coding. For example, I can simply use #import directive to make a COM component accessible from my C++ code, then use CComPtr for easy access (and don't need to worry about releasing it, as it is an auto pointer).

Syndicate content