Posts

How To Do A Cleanup

Image
Why We Clean Image Source: from Google According to my experience, our world is polluted more than our mother nature could handle. But I believe that if we could change ourself then we can change the thoughts of a whole society. And by doing those Cleanups I believe more and more people will be joined hands together and most importantly people will be get educated about the importance of being environmental friendly. Let's Start At first, I must say if anybody wants to do a cleanup even by himself I hope reading my words will help you to do it in a better way!. What I have described in this BLOG is for the people who are organizing the CLEANUP as a group work to involve many people as much as possible. And considering the current trend for the CLEANUPS, I hope this post will come in handy. And also every factor I mentioned here is the experience I gained from the taking part in a set of Volunteering events and I do believe that this BLOG  will greatly he

Java Byte Code Implementation

Image
The Insider Story of JVM The Main Actor Recently I want to get more specialized knowledge about Java. Because every day we want to gain more generalized knowledge. So after few tries I found a good source of knowledge .So I write this post to share the knowledge which I learned. Credits goes to This blog post is basically written on the extracted knowledge from  Ted Neward lecture about Java Byte Code Instruction set. This also could be explain as Java Byte Code implementation . As a programmer, on any language it's good to have a understanding of whats happening under one it. In here we don't dig deep in.This explanation mainly concerned about Byte Code Instructions sets and the tools for it. History Smalltalk Virtual Machine Called StrongTalk. Another company purchased it and improved the VM and got Hotspot the " Java Virtual Machine" (JVM). Because JAVA intend as a embedded language which runes on embedded devices. Reasons to build the

Expecting Professionalism

Image
This post is consists of the things which I learnt from a lecture which conducted by Robert.C.Martin(UncleBob) Everybody says Software Engineering is a profession, But is it 100% true? As a programmer what's the biggest problem which lies right underneath us but we didn't care much about it...?? The answer is , We do not have a profession. What we have is a job, tasks . But nothing about ethics, best practices. There for we can't say we have a profession because there's nothing we "profess". What is this Software even mean. It consist of word Soft-ware, means that this is a soft thing.it means that it will softly change according to the requirement. But what we design is can’t be called as software because flexibility of the piece of code that we write is far below than soft.It’s hard to respond to the requirement of change.we made it hard to change.it means that we build a hardware instead of software. When you

Why using Threads is better in Socket Programming

Image
Socket programming is a topic which has a wide area of knowledge to discuss,But I'm going to demonstrate only about the advantage of using Threads in the socket programming I'm going to use the Java as my programming language in this demonstration,To ease the work I'm going to run a Port scanning program with and with out using Threads.But keep in mind if you using a public place like a Computer Laboratory, port scanning may not be allowed.But if you guys use a private place and work through a localhost then things will be easy. A Thread and a process have some slight differences,if I go through quickly, a thread is a sub category of a process and which needs a low amount of resources to run and let the computer to create more easily because they are lightweight. Java Socket Scanning program which search available(open) ports in the server. public class MainPrograme {       private static String host;       public static void main(String[] args )     {

adding font styles to JOP in Java SE using basic html

Image
This is Not Big Deal,Only need few simple HTML knowledge, Sit back & watch 1)Normal message dialog with default font and color. the Code: JOptionPane.showConfirmDialog(rootPane,  "Do You want to Exit from Invoice? ", "Message", JOptionPane.YES_NO_OPTION); You see,message consists of just plain text(Boring...) 2) Changing the Text properties as I wish * first take the Sentence to show into a String Variable String txt=  "Do You want to Exit from Invoice? "; *Put HTML tags String txt=  "<html>Do You want to Exit from Invoice? </html>"; *Change the Properties (I want the "Invoice" word to be bolt,underlined,colored and set the whole sentence's font size to 4) String txt=  "<html><font size=4>Do You want to Exit from <font color= A7239C><b><u>Invoice</u></b></font> ? </font></html>"; the final Code: JOptionPane.

How to Use KeyEventDispatcher() with Multiple JFrames Easily

Image
I have  to tell that this is the easiest trick I found so far to dealing with multiple JFrames with Keyboard inputs.(Eg:- Closing a JFrame using ESC button ) Scenario: closing the JFrame "Invoice" by pressing ESC and go to another JFrame "Main_menue". 1) First of all you have to import few things as follows import java.awt.KeyEventDispatcher; import java.awt.KeyboardFocusManager; import java.awt.event.KeyEvent;  2) Then Implement your JFrame class to KeyEventDispatcher(used class name is "Invoice") public class Invoice extends javax.swing.JFrame implements KeyEventDispatcher { 3) (Step  3 & 4 make sure to do in JFrame class u want to close)  Then you have to Override the method "public boolean dispatchKeyEvent(KeyEvent e) "  of   KeyEventDispatcher, as follows.         @Override         public boolean dispatchKeyEvent(KeyEvent e) {                     if (e.getID()== KeyEvent.KEY_PRESSED)         {