Category Archives: JavaScript

Loading J2S SWT Application Inside Existed HTML Pages

See the home page for inline demo or visit http://j2s.sourceforge.net/j2s-demo.js for more details. It seemed that sourceforge.net was very slow for my network location. I had to refresh one or two times to get all *.js correctly loaded. And it … Continue reading

Posted in Java2Script News, JavaScript | Leave a comment

A Link An Application

For example: javascript:(function(){var d=document,b=%22http://java2script.ognize.com/1.0.0-m3/%22,t=%22onreadystatechange%22,x=d.createElement(%22SCRIPT%22),f=function(){var s=this.readyState;if(s==null||s==%22loaded%22||s==%22complete%22){var c=%22org.eclipse.swt.examples.controlexample.ControlExample%22;$CL1(b);$CL2(b+%22../control-examples/%22);$CL3(c,function(){eval(c+%22.main([]);%22);});}};x.src=b+%22j2slib.js%22;(typeof x[t]==%22undefined%22)?x.onload=f:x[t]=f;d.getElementsByTagName(%22HEAD%22)[0].appendChild(x);return;})(); will link to an SWT control examples. We can also call this as “A Link An Application”(ALAA). OK, let’s see what is going on. Now load SWT control examples from java2script.ognize.com (test site … Continue reading

Posted in A Link An Application, ALAA, Java, Java2Script News, JavaScript, SWT, Sharing | Comments Off

Position is Everything

Currently, J2S’ SWT widgets are on the way of being pixel-precise. And some certain pain things come up: 1. Different browsers IE (IE6/5.5/5.0 and IE7, too many, I mainly work on IE6), Firefox (Different versions will render position in some … Continue reading

Posted in Java, JavaScript, Sharing | Leave a comment

GWT v.s. Java2Script SWT

Google has released Google Web Toolkit (GWT), …. Aha, google is doing the same thing as me: Java2Script Pacemaker. The same pattern: Java-to-JavaScript compiler, provide general java.lang.* and java.util.*, and an extra UI widget library. In Google Web Toolkit, the … Continue reading

Posted in Java, Java2Script News, JavaScript, Uncategorized | 11 Comments

Will JavaScript 2 be the Future of the Web?

In “Brendan Eich: JavaScript 2 and the Future of the Web”, it says: We were lucky enough to have Brendan Eich, creator of JavaScript, give a keynote at The Ajax Experience. We have placed the presentation online so everyone can … Continue reading

Posted in Java, JavaScript | Comments Off

Early J2S’ Eclipse JFace Dialog

I spent sometimes on converting Eclipse’ JFace codes, and got something like TitleAreaDialog: But it took about 2+s(4s for IE6 on my machine) to do such layout (this time does not include the 1+s loading the *.js). It was just … Continue reading

Posted in Java2Script News, JavaScript, Sharing, User Experience | Comments Off

Object Oriented Programming in JavaScript by Java2Script

Object Oriented Programming in JavaScript by Java2Script Continue reading

Posted in Java, JavaScript | 2 Comments

J2S JavaScript Inheritance Core Released

News: J2S Clazz released (March 10, 2006) About J2S Clazz: J2S Clazz is the core JavaScript file for the Java style classical inheritance system. It’s the fundamental part of Java2Script Pacemaker. Features: It’s small, less than 8K. It provides full … Continue reading

Posted in Java2Script News, JavaScript | 2 Comments

Simple RSS Reader by J2S SWT and AJAX

News: Feb 16, 2006 J2S provides two more tutorials: Tutorial of J2S in Eclipse (5): How to Use org.eclipse.swt.* — Tour to UI Tutorial of J2S in Eclipse (6): How to Use ajax.* — A Simple RSS Reader Here, take … Continue reading

Posted in Java, Java2Script News, JavaScript | 1 Comment

About String in Firefox, IE and Opera

In round of “String += String” match, Firefox v.s. IE v.s. Opera, and the WINNER is Opera 8. Continue reading

Posted in JavaScript | Leave a comment