Java source code from Tushar Kapila

 

TGKSoft

 

 

T o center a frame in the middle of the screen, adjusting for the task bar.

JApplet that writes to file system Dj Data Capture runs on windows and mac

We do Google android mobile applications. Contact for a quote.
To make a URL connection in J2ME:
private boolean f1(String url)

try {
htcon = (HttpConnection)Connector.open(url);
htcon .setRequestProperty("User-Agent",
"Profile/MIDP-2.0 Configuration/CLDC-1.0");
os = c.openOutputStream();
os.write("patientId(13).getFile(1)\n".getBytes());
os.flush();
rc = c.getResponseCode();
u.sl("opened url c.getResponseCode() " + c.getResponseCode());
if (rc != HttpConnection.HTTP_OK) {
//throw new IOException("HTTP response code: " + rc);
return false;
}

is = new BufferedInputStream(c.openInputStream());
   
Saving / creating a Excel file using apache POI in java
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(oSheetPro.sMasterXls));
HSSFWorkbook hssfWorkbook = new HSSFWorkbook(fs);
HSSFSheet hssfSheet = hssfWorkbook.getSheet(oSheetPro.sSheetName1 );
Utl.soup("\n\noSheetPro.sSheetName1 :" + oSheetPro.sSheetName1 + "|\t hssfSheet " + hssfSheet);
final int iNoSqlCols = Integer.parseInt( oPropsSql.getProperty("noSqlCols")) ;
final int iXlsCols = Integer.parseInt( oPropsSql.getProperty("m_nofXlsCols")) ;
Object []oRsltStRowDat = new Object[ iNoSqlCols];
i=-1;
int iIndxRow= -1;
HSSFRow hssfRow =null;
HSSFCell hssfCell =null;
Utl.soup("iXlsCols " + iXlsCols + "\t iNoSqlCols :" + iNoSqlCols);
while(oSqlDat.next()){
iIndxRow++;
for(i = 1; i <= iNoSqlCols ;i++){
oRsltStRowDat [i -1] = oSqlDat.getObject(i);
}

hssfRow = hssfSheet.getRow(oSheetPro.iS1FrmRow + iIndxRow);
if (hssfRow == null){
hssfRow =hssfSheet.createRow((short) (oSheetPro.iS1FrmRow + iIndxRow) );
}
Utl.soup("\noSheetPro.iS1FrmRow :" + oSheetPro.iS1FrmRow + "|\t iIndxRow " + iIndxRow
+ "\t hssfRow " + hssfRow + "|\toSheetPro.iS1FrmCol " + oSheetPro