Posts

Showing posts from November, 2013

How to Detect CapsLock key using Java in NetBeansIDE.

Image
How to Detect CapsLock key using Java in NetBeansIDE. Note: packages and classes used: - java.awt.Toolkit; - java.awt.event.KeyEvent; 1. Open NetBeansIDE. 2. Make a new project say DemoCaps. 3. Make a new JFrame Form in it say CapsLockDetect and design it. 4. RC on Form and Goto Properties~Events~KeyPressed~Select formKeyPressed. 5. Write the following code in the method and Fix all imports:    if(Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK))    {        jLabel.setText("ON");    }    else    {        jLabel.setText("OFF");    } 6. Run the Project. 7. Finish. Thank You :)

How to display record in a table on web page using Servlet, using JAVA in NetBeansIDE

Image
  How to display record in a table on web page using Servlet, using JAVA in NetBeansIDE. 1. Open NetBeansIDE 2. In your project, make a new Servlet (say 'GetDataServlet') 3. In servlet write the code in 'processRequest' method      Code Download : http://www.4shared.com/office/-Z7OvgNO/display_record.html 4. Make a hyperlink in index.jsp with href="GetDataServlet" or as in web.xml 5. Add required JAR in Libraries folder. 6. Run your project. 7. Finish Facebook Page : https://www.facebook.com/pages/Raks/335960303097841 Description: