Get Windows Directory In Java Saturday, November 17, 2012 java.lang, System Properties Edit A single line of code to get Windows (System directory) of your PC folder path in Java. Get Windows Directory class GetWindowsDir { ... Read More
Get Java Installation Directory In Java java.lang, System Properties Edit Single statement to get the directory where Java is installed in your computer. Java Installation Directory class JavaInstallationD... Read More
Get Operating System Name In Java java.lang, System Properties Edit Single statement is enough for getting OS name in Java. So simple. Get OS Name class OSName { public static void main(String a... Read More
Subtract Elements In Array In Java Friday, November 16, 2012 Arrays, Java Utilities Edit An example code on subtracting elements in array in Java in decreasing order in 3 main steps. This simple logic can also be used on any pro... Read More
Sort Array In Increasing Order In Java Arrays, Java Utilities Edit An example code on sorting an array of (any numeric datatype) in increasing order in a single statement. Sorting Array in Increasing ... Read More
Add All Elements In Array In Java Arrays Edit An example on adding all the elements in an array that user gives. A really simple logic involving 2 main steps. Add all Elements in Arr... Read More
Stringtokenizer In Java Example Thursday, November 15, 2012 Java Utilities Edit An example on using java.util.StringTokenizer for counting no.of tokens split by a delimeter, using the methods hasMoreTokens() , nextToke... Read More
Java Code To Play Mp3 File Wednesday, November 14, 2012 Java Media Framework Edit An example code on playing not only mp3 but any audio file in Java in just 2 statements. Your first step to create an audio player. Inst... Read More
Split String By Length In Java Tuesday, November 13, 2012 String Handling Edit An example on splitting a string after 'n' characters i.e. into chunks with n characters each in Java. Let's Split im... Read More
Set Classpath In Java Permanently Monday, November 12, 2012 Software Installation Edit Setting classpath is the most essential part that every Java starter has to know because not just Java gives the developer the capability t... Read More
Capitalize A String In Java String Handling Edit An example on making the characters after the space capital if they are not, in Java. Here is a logic that i've written and that's ... Read More
Catch The Rat: Simple Game In Java Saturday, November 10, 2012 Games Edit A simple, shortest and easiest game that could be written in Java using Swing components and event handling. What's your opinion a... Read More
Create Your Own Javadoc From Command Prompt Friday, November 9, 2012 Miscellaneous Edit You can learn Java, understand each and every method, constructor with the help of some files that you may already have seen on docs.oracle... Read More
Check Alphabets And Digits In String Using Regex Thursday, November 8, 2012 Regular Expressions Edit An example on checking whether a string contains only alphabets and numbers using Regular Expressions in Java. Example // For Patter... Read More
Paste Image From Clipboard On Jframe In Java Tuesday, November 6, 2012 Abstract Window Toolkit, Clipboard Edit The following illustrates pasting an image from clipboard in Java and setting it as background image for JFrame. // Import for BorderL... Read More
Get Data From Clipboard In Java Abstract Window Toolkit, Clipboard Edit Here is how to get text from clipboard in Java and print it in two simple statements. import java.awt.*; import java.awt.datatransfer... Read More
Convert Images In Java Image IO Edit An example on converting images between JPG, PNG, GIF formats in Java in two simple steps. Example // Import for ImageIO class impo... Read More
Get Screen Center Point In Java Abstract Window Toolkit Edit An example on getting screen center in Java in a single statement! import java.awt.*; class GetCenter { public static void main(St... Read More
Get All Installed Fonts In A Pc Abstract Window Toolkit Edit An example on getting the list of all installed fonts in your PC in Font[] and String[]. import java.awt.*; class GetFonts { public... Read More
Create Beep Sound In Java Abstract Window Toolkit Edit An example on generating beep sound using Java agenda in AWT. Example import java.awt.*; class BeepSound { public static void main(... Read More
Get Screen Size And Resolution In Java Monday, November 5, 2012 Abstract Window Toolkit Edit An example on getting and printing screen size and resolution (dots per pixel) in Java. Example import java.awt.*; class GetScreenS... Read More
Center Jdialog On Screen & Jframe In Java Swing Swing Components Edit An example on keeping JDialog on the center of the screen and on the center of JFrame in Java. Example import javax.swing.*; impor... Read More