Re: [javaCompiler-users] NetBeans and JSwing Layout Support and JMF Support
Status: Beta
Brought to you by:
soapy
From: Joe O. <joe...@ya...> - 2006-09-22 06:43:06
|
Dear Marco > An example: > > You want to do: aJButton.setBackground(Color.RED); > But swingWT doesn't have this method. So you > download the swingWT > source, go to the JButton source file and add the > method: > > public void setBackground(Color c) > { > privateButton.setBackground(new > Color(Display.getCurrent(), c.getRed(), > c.getGreen(), c.getBlue()); > } > > While now privateButton is a > org.eclipse.swt.widgets.Button and Color is > a org.eclipse.swt.graphics.Color. As I said, you > fake the AWT/Swing API > to the outside and map that internally to SWT. > > When you have done that, compile swingWT to a jar > and overwrite the one > from JavaCompiler. > Thanks for that example. It has cleared up a lot for me. I see it now. I can do that. Hopefully there won't be too many methods or classes that are not mapped. I only had 16 errors and several were repeated occurrences. > > No, you have to do a lot more and need deep > AWT/Swing&SWT knowledge to > get swingWT working for your needs. > > I have dealt with all "symbol not found" errors by changing the methods or removing them if they could be made redundant. I have successfully compiled a 6 Mb file after stripping and compression. creating JFrame1-win.exe - compiling sources for Java 1.5 preprocessing Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. - Java 1.5 file (*.class) preprocessing [RetroWeaver] Processing 87 classe(s) [RetroWeaver] 87 classe(s) weaved. - Java 1.5 preprocessing: jxl.jar [RetroWeaver] Processing 482 classe(s) [RetroWeaver] 482 classe(s) weaved. - processing jxl.jar-weaved.jar - main compilation step - packing executable done *********** After doubleclicking this file I get the following on the console and the executable stops. It doesn't hang. It simply stops, just like a pause of some kind, with a blinking cursor at the end. cpu usage is zero. What is happening? I got the same result on W2k and Win98se. It appears as though the executable thinks it has finished it's work. This is the console output: ******* This is SwingWT (http://swingwt.sourceforge.net) Version: 0.87 (020605)[SWT win32 3139] Copyright(c)2003-2005, R.Rawson-Tetley and other contributors. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public Licence for more details. ******** Do you have any ideas? Ich verstehe nur Bahnhof. :) Regards Joe ____________________________________________________ On Yahoo!7 360° new features: Blog polls, visitor stats custom themes and more! http://www.yahoo7.com.au/360 |