This article will describe how to set a image as icon for a jLabel with example source code.The image will appear as the background of the jLabel.First the image object is created from the image file.Next the scaled instance image object is created.Next the ImageIcon object is created.The SetIcon method is ised to set the Continue Reading …
Latest Posts
Processing command line arguments in java application
A java application may accept one or more command line arguments.Command line arguments are additional parameters passed to the jar file.The program flow will be different based on what the command line argument is/are.The command line arguments have, therefore, to be processed in the main() function at the very beginning.This article with example source code Continue Reading …
Center Jframe to screen in java application
This article will describe how to center the Jframe to the screen in a java application with example source code.Whatever the screen size is the Jframe will be centered both horizontally and vertically in the screen.Here is the source code to do this. Use the CenterJFrame() function after the initComponents() function of the Jframe class Continue Reading …
Check antivirus installation in windows using wmi in vb.net programmatically
Using wmi in vb.net programmatically,this article will tell you how to check if antivirus is installed or not,the name of the antivirus product and the status of the antivirus, if the antivirus is enabled or disabled and updated or not updated The appendOutput function in the example below appends output to a rich text box,you Continue Reading …
Flush DNS Cache in Windows
Flushing DNS cache is required when you have moved your web content to a new IP address or whatever be the reason.Flushing DNS in windows is actually very simple and just requires one command at the command prompt c:\ipconfig /flushdns Continue Reading …
Show Adsense Ads Below Post Title in WordPress Blog
I am going to tell you how to show your google adsense ads below the title of the post.We are going to modify the theme directly and create a widget area below the post title.The Ad is going to show below the post title and the content will follow after the ad has finished. Step Continue Reading …
Why use PHP ? Dynamic html inside PHP
Why should we use PHP and what are the benefits of using PHP.Also how dynamic html can be generated by embedding html inside php constructs. PHP is a powerful language and can be used to render very dynamic html. The term dynamic html implies that html code which may vary depending on various conditions.You will Continue Reading …
How to read and write from a file in php ?
Want to write some data to a text file and read the value.This article will demonstrate to you by an example how to write to a file and also an example to read from a file in PHP.The file will be written at a specified folder in your web hosting server and also be read Continue Reading …