Tuesday, June 8, 2010

How to increase Row Widths in a SWT Code

final Table table = new Table(composite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
table.setLinesVisible(true);
table.setSize(555, 555);
// resize the row height using a MeasureItem listener
table.addListener(SWT.MeasureItem, new Listener() {
public void handleEvent(Event event) {
// height cannot be per row so simply set
event.height = 20;
}
});

Tuesday, April 6, 2010

What to go for ?? JDK or JRE

Well if net speed is not an issure, I suggest go for the lastest version of JDK from
most probably its

JDK 6 Update xx


whats the difference between JDK and JRE !!
As the name says JDK is java development KIt, it bundles many softwares like (debuggers, development tools, ) along with one or more JREs. On the other hand JRE is the run time environment, its the implementation of Java Virtual Machine meant for running JAVA programs...

If all you want to do is to learn java basics at minimal level (to just run javac mycode.java and then run it) i would suggest go for JRE only...

How to set Path Variables

Most of you might me knowing but for the rest....


if we have a user variable lets say :

JAVA_HOME --> C:\Program Files\Java\jdk1.6.0_19

we can add it in the "Path" System variable simple by following these steps:
1. Right click on My Computer
2. Select Properties
3. Select Advanced Tab
4. Click on Environment Variables button

Path --> C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Credant\Shield v5.4.2\;C:\Program Files\QuickTime\QTSystem\;T:\acme\current\bin;%JAVA_HOME%\bin;


In the above red colored is the "uservariable" and \bin can be added if we are having the .bat/.sh file in the bin folder.

Remember not setting the variable wont give the complile time error but will throw error at runtime