Wednesday, February 23, 2011

Generate PDF

import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfWriter; public class PDFServlet extends HttpServlet {  public void init(ServletConfig config) throws ServletException {   super.init(config);  }  public void doGet(HttpServletRequest request, HttpServletResponse response)    throws ServletException, IOException {   doPost(request,...

Saturday, February 19, 2011

when click a radio button display related text boxes

<html> <head> <script language='javascript'> function display(){         if(document.frmRadio.selType[0].checked){        document.getElementById('div1').style.display = 'block';        document.getElementById('div2').style.display = 'block' ;      }      else{        document.getElementById('div2').style.display =  'none';        document.getElementById('div1').style.display...

Wednesday, February 16, 2011

bat file of project

start firefox "http://localhost:9090/nani/query.ht...

Tuesday, February 15, 2011

Swing table with file data

import java.awt.Color; import java.io.*; import java.util.*; import javax.swing.*; import javax.swing.table.*; public class InsertFileDataToJTable extends AbstractTableModel {     /**      *      */     private static final long serialVersionUID = 1L;     Vector<String> data;     Vector<String> columns;     int i = 1;     public InsertFileDataToJTable() {         String line;   ...