Tuesday, 29 April 2014

Today You will learn : How to set environment variable for Java How to Run Java from Command Prompt How to Compile Java code from Command Prompt Before Starting You must check if  JDK is installed if not download install it from oracle's official website. Lets get Started : Click Advanced System Settings under Computer Properties Click Environment Variables Create a New one with the name path Go to the bin in the...

Monday, 14 April 2014

Things you will learn : What are Headers How to create Headers Why should i create Headers How to include header in your program What are Header files?   Header files are similar to the library files in Java. They are created once and can be used in any program in which they are included. Actually you define your functions in the header files to use them again and again without typing the whole code again. All you have to do is to include them in your program first. The most common header files in C/C++ is"conio.h" inside this header...

Tuesday, 8 April 2014

Today You will learn : How to use Inner Class to use Key Events and Mouse Events How to cancel key typed event in Java How make numeric JTextField How to limit the number of characters in JTextField consume() method of the KeyListener interface Character.isDigit() method and getKeyChar() method The main things here are the JTextField , KeyEvents , Inner Classes in Java and how to create numeric TextFields...

Thursday, 3 April 2014

What You are About to Learn? Array Reversing Java String.charAt(index) method String Reversing StringBuilder StringBuffer.reverse() method in Java Java String.toCharArray() method String Reversing Method # 1 :  public class StringReversing { public static void main(String args[]){ char temp; String s = new String("Hello"); System.out.println(s); char str[] = s.toCharArray(); int last = s.length() - 1;...

Tuesday, 1 April 2014

Why to make a TextBox numeric ?    Imagine the situation in which you are making a calculator app and if the user types chars except digits that may result in undesired output. A wise programmer will not let that happen and he will restrict the user to type only numbers so that the chance of user mistyping is eliminated.            Today i am going to tell you how to make numeric textbox and other useful stuff you can do with textbox     Here is the code : private void textBox1_KeyPress(object...
Subscribe to RSS Feed Follow me on Twitter!