swingwt-developers Mailing List for SwingWT (Page 5)
Status: Beta
Brought to you by:
bobintetley
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(16) |
Feb
(20) |
Mar
(10) |
Apr
(35) |
May
(117) |
Jun
(41) |
Jul
(14) |
Aug
(19) |
Sep
(14) |
Oct
(5) |
Nov
(7) |
Dec
(4) |
2005 |
Jan
(29) |
Feb
(38) |
Mar
(32) |
Apr
(17) |
May
(5) |
Jun
(15) |
Jul
(2) |
Aug
(9) |
Sep
(5) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
(1) |
Mar
(30) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(4) |
2007 |
Jan
(5) |
Feb
(12) |
Mar
(9) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
(7) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Robin Rawson-T. <ro...@ra...> - 2005-08-30 18:24:19
|
Delete the Graphics2DRenderer class in the custom package - it isn't necessary for normal operation and is there to interoperate with a Sun Java2D. Given that nobody really uses this class and it causes a pain in the ass for so many people, I think I may remove it from the repository (or at least, move it out of the default build). Complaints anyone? Rob On Tue, Aug 30, 2005 at 07:56:38PM +0200, Laurent Debacker wrote: > Hi >=20 > I wanted to first search the mailing list archive to search a solution to= my=20 > problem but couldn't find a search box. >=20 > So I tried to compile SwingWT on Windows with sun jdk1.4. I ran 'ant=20 > -Dsun=3Dno' because I want to get jar files for ikvm. >=20 > javac tell me SwingWT\javax\custom\Graphics2DRenderer.java:102: > cannot resolve symbol: method getRGB(int,int,int,int,int[],int,int) > localtion:class java.awt.image.BufferedImage > awtImage.getRGB(clipX, clipY, clipW, clipH, awtPixels, 0, clipW); >=20 > So I looked at the source code of BufferedImage, but doesn't contains muc= h,=20 > since it extends Image, I looked the code and also coundn't fine a getRGB= =20 > method. >=20 > Could someone tell me what to do please? >=20 > Thanks! > Laurent. --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Laurent D. <deb...@gm...> - 2005-08-30 17:56:39
|
Hi I wanted to first search the mailing list archive to search a solution to m= y=20 problem but couldn't find a search box. So I tried to compile SwingWT on Windows with sun jdk1.4. I ran 'ant=20 -Dsun=3Dno' because I want to get jar files for ikvm. javac tell me SwingWT\javax\custom\Graphics2DRenderer.java:102: cannot resolve symbol: method getRGB(int,int,int,int,int[],int,int) localtion:class java.awt.image.BufferedImage awtImage.getRGB(clipX, clipY, clipW, clipH, awtPixels, 0, clipW); So I looked at the source code of BufferedImage, but doesn't contains much,= =20 since it extends Image, I looked the code and also coundn't fine a getRGB= =20 method. Could someone tell me what to do please? Thanks! Laurent. |
From: Dan A. <dan...@gm...> - 2005-08-24 20:36:35
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> I tried a much simpler example. <br> <br> I have a dialog box that is supposed to look like this:<br> <img alt="" src="cid:par...@gm..." height="198" width="299"><br> <br> It comes out looking like this:<br> <br> <img alt="" src="cid:par...@gm..." height="199" width="300"><br> <br> The buttons are not appearing, because the following exception occurs in the jgoodies tooling when it tries to create the buttons:<br> <br> <br> java.lang.IndexOutOfBoundsException: The column index 6 must be less than or equal to 5.<br> at com.jgoodies.forms.layout.CellConstraints.ensureValidGridBounds(CellConstraints.java:682)<br> at com.jgoodies.forms.layout.FormLayout.setConstraints(FormLayout.java:635)<br> at com.jgoodies.forms.layout.FormLayout.addLayoutComponent(FormLayout.java:828)<br> at swingwt.awt.Container.addComponentToLayout(Container.java:302)<br> at swingwt.awt.Container.doAdd(Container.java:257)<br> at swingwt.awt.Container.setSwingWTParent(Container.java:502)<br> at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618)<br> at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151)<br> at swingwt.awt.Container$1.run(Container.java:266)<br> at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109)<br> at swingwt.awt.Container.doAdd(Container.java:262)<br> at swingwt.awt.Container.setSwingWTParent(Container.java:502)<br> at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618)<br> at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151)<br> at swingwt.awt.Container$1.run(Container.java:266)<br> at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109)<br> at swingwt.awt.Container.doAdd(Container.java:262)<br> at swingwt.awt.Container.setSwingWTParent(Container.java:502)<br> at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618)<br> at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151)<br> at swingwt.awt.Container$1.run(Container.java:266)<br> at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109)<br> at swingwt.awt.Container.doAdd(Container.java:262)<br> at swingwt.awt.Container.setSwingWTParent(Container.java:502)<br> at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618)<br> at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151)<br> at swingwt.awt.Window.createImpl(Window.java:278)<br> at swingwt.awt.Window.access$000(Window.java:183)<br> at swingwt.awt.Window$1.run(Window.java:249)<br> at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109)<br> at swingwt.awt.Window.create(Window.java:247)<br> at swingwt.awt.Window.create(Window.java:234)<br> at swingwt.awt.Dialog$1.run(Dialog.java:119)<br> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)<br> at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)<br> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)<br> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)<br> at swingwtx.swing.SwingWTUtils$1.run(SwingWTUtils.java:202)<br> <br> <br> I could probably fix this bug... When I comment out the button code - I no longer get exception, but the gui still doesn't look right. The text fields remain collapsed, and mis-aligned.<br> <br> Here is the (full) source code for this Dialog box. I can provide the modified JGoodies jar file, if desired. That should be the only external dependence of this code (of importance)<br> <br> package edu.mayo.informatics.lexgrid.convert.gui;<br> <br> import swingwt.awt.Dimension;<br> import swingwt.awt.Toolkit;<br> import swingwt.awt.event.ActionEvent;<br> import swingwt.awt.event.ActionListener;<br> <br> import swingwtx.swing.JButton;<br> import swingwtx.swing.JComponent;<br> import swingwtx.swing.JDialog;<br> import swingwtx.swing.JFrame;<br> import swingwtx.swing.JOptionPane;<br> import swingwtx.swing.JTextField;<br> <br> import com.jgoodies.forms.builder.ButtonBarBuilder;<br> import com.jgoodies.forms.builder.DefaultFormBuilder;<br> import com.jgoodies.forms.layout.CellConstraints;<br> import com.jgoodies.forms.layout.FormLayout;<br> <br> import edu.mayo.informatics.lexgrid.convert.utility.Constants;<br> <br> /**<br> * <pre><br> * Title: SettingsViewer.java<br> * Description: Window for configuring advanced conversion options.<br> * Copyright: (c) 2004 Mayo Foundation. All rights reserved.<br> *<br> * Redistribution and use in source and binary forms, with or without modification, are<br> * permitted provided that the following conditions are met:<br> *<br> * 1. Redistributions of source code must retain the above copyright notice, this list of<br> * conditions and the following disclaimer.<br> *<br> * 2. Redistributions in binary form must reproduce the above copyright notice, this<br> * list of conditions and the following disclaimer in the documentation and/or other<br> * materials provided with the distribution.<br> *<br> * 3. The end-user documentation included with the redistribution, if any, must include<br> * the following acknowledgment:<br> * "This product includes software developed by Mayo Clinic Division of Biomedical<br> * Informatics Research (<a class="moz-txt-link-freetext" href="http://informatics.mayo.edu/">http://informatics.mayo.edu/</a>)."<br> * Alternately, this acknowledgment may appear in the software itself, if and wherever<br> * such third-party acknowledgments normally appear.<br> *<br> * 4. The names "Mayo", "Mayo Clinic", "Mayo Foundation", or "LexGrid" must not be used <br> * to endorse or promote products derived from this software without prior written<br> * permission. For written permission, please contact the author or copyright holder.<br> *<br> * 5. Products derived from this software may not be called "LexGrid", nor may<br> * "LexGrid" or "Mayo" appear in their name, without prior written permission of the<br> * author or copyright holder.<br> *<br> * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,<br> * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A<br> * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MAYO CLINIC OR OTHER<br> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED<br> * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT<br> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF<br> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br> * </pre><br> * <br> * @author <A HREF=<a class="moz-txt-link-rfc2396E" href="mailto:arm...@ma...">"mailto:arm...@ma..."</a>>Dan Armbrust </A><br> * @version 1.0 - cvs $Revision: 1.2 $ checked in on $Date: 2005/07/19 20:09:34 $<br> */<br> <br> public class SettingsViewer extends JDialog<br> {<br> JFrame convert_;<br> <br> public static void main(String[] args) throws Exception<br> {<br> JFrame owner = new JFrame();<br> JDialog a = new SettingsViewer(owner);<br> a.setVisible(true);<br> <br> }<br> <br> public SettingsViewer(JFrame owner) throws Exception<br> {<br> super(owner);<br> this.setModal(true);<br> convert_ = owner;<br> this.setTitle("Converter Options");<br> this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br> JComponent panel = buildPanel();<br> this.getContentPane().add(panel);<br> sizeAndCenter(300, 200);<br> }<br> <br> private void sizeAndCenter(int width, int height)<br> {<br> Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();<br> width = (width > screenSize.width ? screenSize.width<br> : width);<br> height = (height > screenSize.height ? screenSize.height<br> : height);<br> this.setSize(width, height);<br> <br> setLocation(screenSize.width / 2 - width / 2, screenSize.height / 2 - height / 2);<br> }<br> <br> private JComponent buildPanel()<br> {<br> initComponents();<br> FormLayout layout = new FormLayout("100dlu, fill:p:grow", // columns<br> "p, 3dlu, p, 3dlu, fill:p:grow, 3dlu, p"); // rows<br> DefaultFormBuilder builder = new DefaultFormBuilder(layout);<br> builder.setDefaultDialogBorder();<br> CellConstraints cc = new CellConstraints();<br> int y = 1;<br> <br> builder.addLabel("LDAP Page Size", cc.xy(1, y));<br> builder.add(ldapPageSize_, cc.xy(2, y++));<br> y++;<br> <br> builder.addLabel("MySql Batch Size", cc.xy(1, y));<br> builder.add(mySqlBatchSize_, cc.xy(2, y++));<br> y++;<br> <br> y++;<br> y++;<br> <br> ButtonBarBuilder buttonBuilder = new ButtonBarBuilder();<br> buttonBuilder.addGlue();<br> buttonBuilder.addGridded(ok_);<br> buttonBuilder.addRelatedGap();<br> buttonBuilder.addGridded(cancel_);<br> buttonBuilder.addGlue();<br> <br> builder.add(buttonBuilder.getPanel(), cc.xywh(1, y++, 2, 1));<br> y++;<br> <br> return builder.getPanel();<br> }<br> <br> JButton ok_;<br> JButton cancel_;<br> JTextField ldapPageSize_;<br> JTextField mySqlBatchSize_;<br> <br> private void initComponents()<br> {<br> ok_ = new JButton("Ok");<br> ok_.addActionListener(new ActionListener()<br> {<br> public void actionPerformed(ActionEvent e)<br> {<br> try<br> {<br> Constants.ldapPageSize = Integer.parseInt(ldapPageSize_.getText());<br> }<br> catch (NumberFormatException e1)<br> {<br> JOptionPane.showMessageDialog(SettingsViewer.this, "Ldap page size must be a number", "Error",<br> JOptionPane.ERROR_MESSAGE);<br> return;<br> }<br> try<br> {<br> Constants.mySqlBatchSize = Integer.parseInt(mySqlBatchSize_.getText());<br> }<br> catch (NumberFormatException e1)<br> {<br> JOptionPane.showMessageDialog(SettingsViewer.this, "MySql batch size must be a number", "Error",<br> JOptionPane.ERROR_MESSAGE);<br> return;<br> }<br> <br> SettingsViewer.this.hide();<br> }<br> });<br> cancel_ = new JButton("Cancel");<br> cancel_.addActionListener(new ActionListener()<br> {<br> public void actionPerformed(ActionEvent e)<br> {<br> SettingsViewer.this.hide();<br> }<br> });<br> <br> ldapPageSize_ = new JTextField(Constants.ldapPageSize + "");<br> mySqlBatchSize_ = new JTextField(Constants.mySqlBatchSize + "");<br> }<br> <br> public void show()<br> {<br> ldapPageSize_.setText(Constants.ldapPageSize + "");<br> mySqlBatchSize_.setText(Constants.mySqlBatchSize + "");<br> super.show();<br> }<br> }<br> <br> Dan<br> <pre class="moz-signature" cols="72">-- **************************** Daniel Armbrust Biomedical Informatics Mayo Clinic Rochester daniel.armbrust(at)mayo.edu <a class="moz-txt-link-freetext" href="http://informatics.mayo.edu/">http://informatics.mayo.edu/</a> </pre> </body> </html> |
From: Dan A. <dan...@gm...> - 2005-08-24 20:21:15
|
Oh, I should also mention, even with all of the exceptions that get spit out, the menus do appear (and work). So I don't think its the menus causing it. Dan -- **************************** Daniel Armbrust Biomedical Informatics Mayo Clinic Rochester daniel.armbrust(at)mayo.edu http://informatics.mayo.edu/ |
From: Dan A. <dan...@gm...> - 2005-08-24 20:14:42
|
Hmm, well, the order of things appears to be correct. My class looks something like this: public class Convert extends JFrame { <snip stuff> JTabbedPane currentlyDisplayedPane_ = null; JTabbedPane importPane_ = null; JTabbedPane exportPane_ = null; JTabbedPane converterPane_ = null; JRadioButton importers_ = null; JRadioButton exporters_ = null; JRadioButton converters_ = null; public static void main(String[] args) throws Exception { new Convert(); } public Convert() throws Exception { <snip stuff> this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); initMenus(); <snip stuff> this.getContentPane().add(builder.getPanel()); this.show(); } And the initMenus() method starts like so: private void initMenus() { JMenuBar jmBar = new JMenuBar(); this.setJMenuBar(jmBar); // fileMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic('f'); jmBar.add(fileMenu); // exitItem exitItem = new JMenuItem("Exit"); exitItem.setMnemonic('x'); exitItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); } }); fileMenu.add(exitItem); <snip rest> } So the order of creation is following the recomendations that I got. I'll experiment with commenting some things out, and see if I can isoloate the problem... but I don't really have much time to spend on this, it was one of those "I wonder if this really works" type of things. If its not an easy fix, (and I want to move over to SWT entirely) I'll probably just rewrite the gui in SWT. But its not likely to rank very high on my priority list since the current gui works. That said, I think the idea of swingwt is really cool, and would like to see it work. If you want to recreate the error locally, the source code for the app I was trying to convert is available: http://informatics.mayo.edu/LexGrid/index.php?page=convert Or, I can zip up and send (or post) what I have right now - basically the code base after making the swingwt conversion to the required libraries and my code. Dan -- **************************** Daniel Armbrust Biomedical Informatics Mayo Clinic Rochester daniel.armbrust(at)mayo.edu http://informatics.mayo.edu/ |
From: Robin Rawson-T. <ro...@ra...> - 2005-08-19 06:58:39
|
Looks like the problem is adding of menus. Since SwingWT maps to real platform menus (which can't be added to regular containers like you can with Swing), they will only work as a setJMenuBar call on a Frame. I've recompiled a few different layout managers (and even written a couple) for SwingWT and they worked ok - they were probably simpler than the one you are using. Rob On Thu, Aug 18, 2005 at 11:05:51AM -0500, Dan Armbrust wrote: > I thought I would give swingwt a try with a swing gui that I wrote a=20 > while ago.=20 >=20 > My swing gui uses the JGoodies forms layout manager (the best layout=20 > manager I've ever seen for swing, by the way) - >=20 > https://looks.dev.java.net/ > http://www.jgoodies.com/freeware/looks/ >=20 > And also foxtrot http://foxtrot.sourceforge.net/. >=20 > So, I recompiled looks and foxtrot with swingwt, and then recompiled my= =20 > code with swingwt and the recompiled libraries.=20 >=20 > The result, was well, a disaster - the app does come up, but the gui is= =20 > totally destroyed (most of the controls are not visible) and a=20 > tremendous stream of exceptions is thrown. >=20 > Has anyone successfully used swingwt with other layout managers? Am I=20 > missing a required step? >=20 > Here is my exception trace: >=20 > This is SwingWT (http://swingwt.sourceforge.net) > Version: 0.87 (020605)[SWT win32 3138] > Copyright(c)2003-2005, R.Rawson-Tetley and other contributors. >=20 > 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. > java.lang.NullPointerException > at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at=20 > swingwtx.swing.JSWTMenuComponent.setCachedProperties(JSWTMenuComponent.ja= va:368) > at swingwt.awt.Container$1.run(Container.java:267) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwtx.swing.JTabbedPane$1.run(JTabbedPane.java:209) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwtx.swing.JTabbedPane.insertTab(JTabbedPane.java:200) > at swingwtx.swing.JTabbedPane.addTab(JTabbedPane.java:176) > at swingwtx.swing.JTabbedPane.setSwingWTParent(JTabbedPane.java:530) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Window.createImpl(Window.java:278) > at swingwt.awt.Window.access$000(Window.java:183) > at swingwt.awt.Window$1.run(Window.java:249) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Window.create(Window.java:247) > at swingwt.awt.Window.create(Window.java:234) > at swingwt.awt.Window$11.run(Window.java:493) > at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) > at=20 > org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:1= 23) > at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) > at swingwtx.swing.SwingWTUtils$1.run(SwingWTUtils.java:202) > java.lang.NullPointerException > at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at=20 > swingwtx.swing.JSWTMenuComponent.setCachedProperties(JSWTMenuComponent.ja= va:368) > at swingwt.awt.Container$1.run(Container.java:267) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwtx.swing.JTabbedPane$1.run(JTabbedPane.java:209) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwtx.swing.JTabbedPane.insertTab(JTabbedPane.java:200) > at swingwtx.swing.JTabbedPane.addTab(JTabbedPane.java:176) > at swingwtx.swing.JTabbedPane.setSwingWTParent(JTabbedPane.java:530) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Container$1.run(Container.java:266) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Container.doAdd(Container.java:262) > at swingwt.awt.Container.setSwingWTParent(Container.java:502) > at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) > at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) > at swingwt.awt.Window.createImpl(Window.java:278) > at swingwt.awt.Window.access$000(Window.java:183) > at swingwt.awt.Window$1.run(Window.java:249) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) > at swingwt.awt.Window.create(Window.java:247) > at swingwt.awt.Window.create(Window.java:234) > at swingwt.awt.Window$11.run(Window.java:493) > at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) > at=20 > org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:1= 23) > at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) > at swingwtx.swing.SwingWTUtils$1.run(SwingWTUtils.java:202) > java.lang.NullPointerException > at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) > at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) >=20 > <snip repeats> >=20 > Thanks, >=20 > Dan >=20 > --=20 > **************************** > Daniel Armbrust > Biomedical Informatics > Mayo Clinic Rochester > daniel.armbrust(at)mayo.edu > http://informatics.mayo.edu/ >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic= es > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Swingwt-developers mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swingwt-developers >=20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Daniel N. <na...@cs...> - 2005-08-18 23:04:45
|
Dan, Hard to say if this has anything to do with the layout manager. But from the stack trace, I can tell the SWT menu component peer is not getting created. Without seeing your code, my best guess is that the order in which the menu item is added and/or setVisible is influencing this. Make sure you things in an order like this: - create JFrame - create JMenu, add to JFrame - set JFrame visible Technically other orders should work, but that would be ideal for SwingWT. If you still have trouble, could you reduce the problem to a small amount of code? Thanks, Dan On Aug 18, 2005, at 11:05 AM, Dan Armbrust wrote: java.lang.NullPointerException at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwtx.swing.JSWTMenuComponent.setCachedProperties(JSWTMenuComponent.java:368) |
From: Dan A. <dan...@gm...> - 2005-08-18 16:34:06
|
I thought I would give swingwt a try with a swing gui that I wrote a while ago. My swing gui uses the JGoodies forms layout manager (the best layout manager I've ever seen for swing, by the way) - https://looks.dev.java.net/ http://www.jgoodies.com/freeware/looks/ And also foxtrot http://foxtrot.sourceforge.net/. So, I recompiled looks and foxtrot with swingwt, and then recompiled my code with swingwt and the recompiled libraries. The result, was well, a disaster - the app does come up, but the gui is totally destroyed (most of the controls are not visible) and a tremendous stream of exceptions is thrown. Has anyone successfully used swingwt with other layout managers? Am I missing a required step? Here is my exception trace: This is SwingWT (http://swingwt.sourceforge.net) Version: 0.87 (020605)[SWT win32 3138] 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. java.lang.NullPointerException at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwtx.swing.JSWTMenuComponent.setCachedProperties(JSWTMenuComponent.java:368) at swingwt.awt.Container$1.run(Container.java:267) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwtx.swing.JTabbedPane$1.run(JTabbedPane.java:209) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwtx.swing.JTabbedPane.insertTab(JTabbedPane.java:200) at swingwtx.swing.JTabbedPane.addTab(JTabbedPane.java:176) at swingwtx.swing.JTabbedPane.setSwingWTParent(JTabbedPane.java:530) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Window.createImpl(Window.java:278) at swingwt.awt.Window.access$000(Window.java:183) at swingwt.awt.Window$1.run(Window.java:249) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Window.create(Window.java:247) at swingwt.awt.Window.create(Window.java:234) at swingwt.awt.Window$11.run(Window.java:493) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) at swingwtx.swing.SwingWTUtils$1.run(SwingWTUtils.java:202) java.lang.NullPointerException at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwtx.swing.JSWTMenuComponent.setCachedProperties(JSWTMenuComponent.java:368) at swingwt.awt.Container$1.run(Container.java:267) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwtx.swing.JTabbedPane$1.run(JTabbedPane.java:209) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwtx.swing.JTabbedPane.insertTab(JTabbedPane.java:200) at swingwtx.swing.JTabbedPane.addTab(JTabbedPane.java:176) at swingwtx.swing.JTabbedPane.setSwingWTParent(JTabbedPane.java:530) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Container$1.run(Container.java:266) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Container.doAdd(Container.java:262) at swingwt.awt.Container.setSwingWTParent(Container.java:502) at swingwtx.swing.JComponent.setSwingWTParent(JComponent.java:618) at swingwtx.swing.JPanel.setSwingWTParent(JPanel.java:151) at swingwt.awt.Window.createImpl(Window.java:278) at swingwt.awt.Window.access$000(Window.java:183) at swingwt.awt.Window$1.run(Window.java:249) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) at swingwt.awt.Window.create(Window.java:247) at swingwt.awt.Window.create(Window.java:234) at swingwt.awt.Window$11.run(Window.java:493) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) at swingwtx.swing.SwingWTUtils$1.run(SwingWTUtils.java:202) java.lang.NullPointerException at swingwtx.swing.JSWTMenuComponent$11.run(JSWTMenuComponent.java:370) at swingwtx.swing.SwingUtilities.invokeSync(SwingUtilities.java:109) <snip repeats> Thanks, Dan -- **************************** Daniel Armbrust Biomedical Informatics Mayo Clinic Rochester daniel.armbrust(at)mayo.edu http://informatics.mayo.edu/ |
From: Robin Rawson-T. <ro...@ra...> - 2005-07-11 19:15:43
|
On Wed, Jul 06, 2005 at 03:37:20PM -0400, jc...@um... wrote: > In the absence of any new 1.5 types (generic types that have > been specified, i.e. Map.Entry<String,Integer>) I assume the > dynamic class loader would work fine with JVM 1.5. However, I > have just tried using generics in my own project source, and I > receive the same fatal error as I was getting out of JDNC 0.7. > Does anyone have any insight as to how I could modify the > custom ClassLoader that SwingWT uses, so that it would > recognize generic types on the Java 5.0 platform? In a word - no. Not until GCJ/Classpath and Kaffe are upto the 5.0 spec anyway. I haven't even looked at Java 1.5 yet! Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: <jc...@um...> - 2005-07-06 19:37:23
|
Hi, My application uses JDNC (www.javadesktop.org) for Java 5.0 (Sun JVM internal ver. 1.5.0_03). I'm trying to avoid modifying the source code of JDNC, which uses Swing/AWT, and I want it to use SwingWT instead. A few of the libraries were compiled for Java 1.5, and thus they may use generics. Generics, I believe, are the source (no pun intended) of my woes. :-) In the absence of any new 1.5 types (generic types that have been specified, i.e. Map.Entry<String,Integer>) I assume the dynamic class loader would work fine with JVM 1.5. However, I have just tried using generics in my own project source, and I receive the same fatal error as I was getting out of JDNC 0.7. Does anyone have any insight as to how I could modify the custom ClassLoader that SwingWT uses, so that it would recognize generic types on the Java 5.0 platform? Thanks, Sean Exception trace follows: SwingWTBootstrap.main has been called 0 times. SwingWT BootStrap, Copyright(c)2004 R.Rawson-Tetley This program uses classloading code from the WebOnSwing (http://webonswing.sourceforge.net) and Apache BCEL projects. This program 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. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at swingwt.classloader.SwingWTBootstrap.main(SwingWTBootstrap.java:75) at formEngine.Driver.main(Driver.java:23) Caused by: java.lang.ClassFormatError: LVTT entry for 'grook' //AUTHOR'S ANNOTATION: grook is a local variable of type //Map.Entry<Mapping,Mapping> where Mapping extends Object. in class file formEngine/BasicFormModel does not match any LVT entry at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at swingwt.classloader.SwingWTClassLoader.transform(SwingWTClassLoader.java:93) at swingwt.classloader.SwingWTClassLoader.findClass(SwingWTClassLoader.java:64) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java:106) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java:74) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at swingwt.classloader.SwingWTClassLoader.transform(SwingWTClassLoader.java:93) at swingwt.classloader.SwingWTClassLoader.findClass(SwingWTClassLoader.java:64) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java:106) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java:74) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at formEngine.SubDriver.main(SubDriver.java:23) ... 6 more |
From: Robin Rawson-T. <ro...@ra...> - 2005-06-20 14:08:39
|
Ok, as I understand it, here is the OSX threading problem: 1. SWT OSX uses Carbon to talk to the underlying UI layer. 2. The Carbon widgets rely on their callers running in the system thread. This means that we have to use the java_swt kludge which causes your java program to start on the system thread. 3. This has a knock-on effect in that SwingWT has to run the SWT event loop on the system thread (hence the special "initialiseMacOSX" routine you have to use, which starts the event loop going on the thread you are running on (which should be the system thread) and then wraps a Runnable around your real startup code and tells the event loop to run it). 4. This does not explain why spawning a new thread causes an application to hang. The problem is not with java_swt itself as a test program allows me to spawn new threads without any problem. This only becomes an issue once an event loop has started. Thoughts (and things we could maybe test): 1. Thread priorities. Could the system thread have a higher priority than the default priority given to new Thread() in OSX and therefore the event loop never yields to other threads? A test might be to write a simple SwingWT app for OSX that spawns a new thread with a high priority to see if that solves it. 2. Blocking: Could the display.sleep() method of SWT not be yielding long enough for another thread to do anything? Would a standard Thread.sleep(ms) in the event loop allow other threads to run? There is some old code in there for dispatch thread retardation in there - have a program turn it on and see if the other threads run. I'll try some of these when I get chance. Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Robin Rawson-T. <ro...@ra...> - 2005-06-20 13:18:19
|
On Mon, Jun 20, 2005 at 08:49:50AM -0400, Ken Hawkins wrote: > SwingWT (and java for that fact) are not running natively in OS X. =20 > Are you in OS X perhaps? the current method of invalidating does not =20 > work with OS X. What I had to do in order to make sure changes show =20 > up in the UI (in JFrame and JDialog cases) was this; If it's the bug I'm thinking of, it showed up in GTK2 as well. The bug seems to be a problem with SWT itself and occasionally when you create a shell, something goes badly wrong with it and it appears with a virtually zero size. Unfortunately, it didn't happen all the time. I added the repaintFix() code to swingwt.awt.Window to compensate for this (which it does on GTK2). You can call it from your own code to guarantee that a Window descendant will redraw the UI. This might be a better candidate to hook up to updateUI() ? I agree though, a much better solution is desparately needed. Even worse than that, I have two MacOSX bugs I'm trying to find solutions for (just asking since you guys are OSX devs and might know): 1. Orphaned threads - spawning any new thread seems to basically hang the application. Seems to be a general Apple Java problem but I've not seen any useful help for this yet. This is a bitch for SwingWT as it means you have to have specialised MacOSX startup code currently as starting the dispatch thread on a new one hangs your application (as it is, the startup code I advocate for OSX runs the=20 dispatch thread on the system thread) 2. Offset combo boxes. The JComboBox implementation has the data shunted an inch to the left so you can't see all the text. Once the box receives the focus, this problem goes away.=20 Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Ken H. <ke...@ro...> - 2005-06-20 12:50:15
|
SwingWT (and java for that fact) are not running natively in OS X. =20 Are you in OS X perhaps? the current method of invalidating does not =20 work with OS X. What I had to do in order to make sure changes show =20 up in the UI (in JFrame and JDialog cases) was this; I added a class: import swingwtx.swing.JWindow; import swingwtx.swing.SwingWTUtils; import swingwtx.swing.JDialog; import swingwt.awt.Dialog; import swingwt.awt.Point; // // DialogHelper.java // // Created by Ken on 5/26/05. // Copyright 2005. All rights reserved. // public class DialogHelper { public static void blitSmallDialog(JDialog dialog) { // hack to ensure that window changes show up if(SwingWTUtils.isMacOSX()) { blitDialog(dialog.getLocation()); } } public static void blitSmallDialog(JWindow window) { // hack to ensure that window changes show up if(SwingWTUtils.isMacOSX()) { blitDialog(window.getLocation()); } } private static void blitDialog(Point p) { p.setLocation((p.getX() + 5), (p.getY() + 5)); Dialog d =3D new JDialog(); d.setSize(1,1); d.setLocation(p); d.setModal(false); d.show(); d.dispose(); d =3D null; } } then in order to use it i call code like; JDialog splashWindow =3D getSplashWindow(); splashWindow.setVisible(); // hack to ensure that the splash window shows up DialogHelper.blitSmallDialog(splashWindow.getWindow()); I created a separate static class because our code base is littered =20 with the bug it would be nice if this were fixed in SwingWT however... Could be a long winded explanation all for not if you are not in OS X =20= but what the heck the coffee is flowing this am. regards, ken; On Jun 18, 2005, at 9:03 AM, Niklas Gustafsson wrote: > My resent question was maby not correct. > > The updateUI in Swing is responsible for update the components ui =20 > delegates =93look and feel=94 > > In SwingWT isn=92t the ui always native. ? > > I use the method setVisible(true) to show the Jcomponent in a =20 > container. > > I only use update updateUI on menuBar if the menuBar is in a =20 > Hewyweight-component like JFrame. > > Or in my own component in constructor to set/update its ui. > > > > How is this implemented in SwingWT ? > > > > //Niklas > > |
From: Niklas G. <ngu...@sp...> - 2005-06-20 06:46:44
|
This method is missing in swingWT. ensureIndexIsVisible(int); ( in JList ) //Niklas |
From: Niklas G. <ngu...@sp...> - 2005-06-18 13:02:13
|
My resent question was maby not correct. The updateUI in Swing is responsible for update the components ui delegates "look and feel" In SwingWT isn't the ui always native. ? I use the method setVisible(true) to show the Jcomponent in a container. I only use update updateUI on menuBar if the menuBar is in a Hewyweight-component like JFrame. Or in my own component in constructor to set/update its ui. How is this implemented in SwingWT ? //Niklas |
From: Damian M. <da...@sp...> - 2005-06-18 07:00:46
|
It doesn't work. I tried invalidate the actual container in which I'm putting the dynamic Panels , then it's parent , and its parent. But no luck with none of the called invalidate. I'm adding new panels for some row data information. The Strange is that when I resize it it shows current number of rows. If I go to other information where rows a more I must again resize to see them all. May be it is some kind of layout problem. Because some of them a visible. Robin Rawson-Tetley wrote: >container.invalidate() should do the job... > >On Fri, Jun 17, 2005 at 06:10:07PM +0300, Damian Minkov wrote: > > >>What is the equal method in swingwt of the swing's updateUI(); >>I have some panels added dinamycally and are not visible. If I resize >>the window they become visible. >> >> >>------------------------------------------------------- >>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >>from IBM. Find simple to follow Roadmaps, straightforward articles, >>informative Webcasts and more! Get everything you need to get up to >>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >>_______________________________________________ >>Swingwt-developers mailing list >>Swi...@li... >>https://lists.sourceforge.net/lists/listinfo/swingwt-developers >> >> > > > -- Best Regards, Damian Minkov Tel: (+359-2) 873-33-567 Mobile: (+359-88) 853-28-25 E-Mail: dam...@da... dam...@ya... da...@sp... ICQ: 51226782 http://damencho.com http://damencho.cosmo-tel.com |
From: Niklas G. <ngu...@sp...> - 2005-06-17 22:43:05
|
Is it possible to have to method updateUI wrapped around container.invalidate(); It obvious does some of the updateUI's job. For easier port from Swing to SwingWT. container.invalidate() should do the job... On Fri, Jun 17, 2005 at 06:10:07PM +0300, Damian Minkov wrote: > What is the equal method in swingwt of the swing's updateUI(); I have > some panels added dinamycally and are not visible. If I resize the > window they become visible. //Niklas |
From: Robin Rawson-T. <ro...@ra...> - 2005-06-17 15:30:38
|
container.invalidate() should do the job... On Fri, Jun 17, 2005 at 06:10:07PM +0300, Damian Minkov wrote: > What is the equal method in swingwt of the swing's updateUI(); > I have some panels added dinamycally and are not visible. If I resize=20 > the window they become visible. >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Swingwt-developers mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swingwt-developers --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Damian M. <da...@sp...> - 2005-06-17 15:11:43
|
What is the equal method in swingwt of the swing's updateUI(); I have some panels added dinamycally and are not visible. If I resize the window they become visible. |
From: Robin Rawson-T. <ro...@ra...> - 2005-06-15 13:05:06
|
> I'm a Java developer that uses SwingWT because it's simply perfect!! :-) . Thanks ;-) > " You can also use various Java pre-processors or Ant to change your=20 > code at build time for you." > I've searched for some preprocessor but i want to know the Ant way. So=20 > can you explain to > me the Ant way to do code modifications at build time?. I'm using Eclipse= 3. > Thank you. Sure, in your build script, define a new target to alter the awt/swing packages to SwingWT like this: <target name=3D"preprocess" description=3D"switch swing/awt for swingwt"> <replace dir=3D"src" token=3D"javax.swing" value=3D"swingwtx.swing"/> <replace dir=3D"src" token=3D"java.awt" value=3D"swingwt.awt"/> <replace dir=3D"src" token=3D"java.applet" value=3D"swingwt.applet"/> </target> <target name=3D"compile" depends=3D"preprocess"> .. etc. Hope this helps, Rob =20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Daniel N. <na...@cs...> - 2005-06-11 20:49:05
|
Hello Damian, The InputMap and ActionMap isn't fully implemented - although the classes themselves are functional, the functionality built around them is only stubbed out in JComponent. For your example, you may be able to get around it by using a FocusListener. hope this helps, Dan On Jun 11, 2005, at 2:02 PM, Damian Minkov wrote: > I'm using the last 0.87 version > > this code doesn't work for me using swingwt , but works using swing: > > component.getInputMap(JComponent.WHEN_FOCUSED, true).put > (KeyStroke.getKeyStroke("F2"), action.getValue(Action.NAME)); > component.getActionMap().put(action, action.getValue(Action.NAME)); > > any ideas ? > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > you shotput > a projector? How fast can you ride your desk chair down the office > luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Swingwt-developers mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swingwt-developers > |
From: Damian M. <da...@sp...> - 2005-06-11 19:11:31
|
I'm using the last 0.87 version this code doesn't work for me using swingwt , but works using swing: component.getInputMap(JComponent.WHEN_FOCUSED, true).put(KeyStroke.getKeyStroke("F2"), action.getValue(Action.NAME)); component.getActionMap().put(action, action.getValue(Action.NAME)); any ideas ? |
From: Robin Rawson-T. <ro...@ra...> - 2005-06-04 07:07:01
|
Couldn't say to be honest - SwingWT doesn't really rely on any obscure bits of the JDK (just SWT). As long as the J9 VM can cope with threading ok you shouldn't have a problem (SwingWT uses threads extensively). Rob On Fri, Jun 03, 2005 at 04:45:15PM -0600, Mclean, Stephen wrote: > I'm wondering if it is possible to get SwingWT working with a PDA. Has > anyone ever tried this? I'd like to be able to develop my program for > the PDA using Swing, but if I can't do it, then I'll just have to learn > SWT. I'm using the J9 VM from IBM and trying to get a HelloWorld (Swing > version) application working. I'd appreciate any feedback or any > comments. Thanks >=20 > Stephen --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Mclean, S. <sm...@sa...> - 2005-06-03 22:45:32
|
I'm wondering if it is possible to get SwingWT working with a PDA. Has anyone ever tried this? I'd like to be able to develop my program for the PDA using Swing, but if I can't do it, then I'll just have to learn SWT. I'm using the J9 VM from IBM and trying to get a HelloWorld (Swing version) application working. I'd appreciate any feedback or any comments. Thanks Stephen |
From: Robin Rawson-T. <ro...@ra...> - 2005-06-02 20:19:17
|
On Thu, Jun 02, 2005 at 09:49:53PM +0200, Jens wrote: > I tried to compile swingWT on gentoo with 64bit. This is what happens > root@jens SwingWT # make > [libswt.so Linux/GTK2] > unzip /home/jens/source/SwingWT/lib/linux_gtk2/swt-source.zip > replace org/eclipse/swt/dnd/TreeDragUnderEffect.java? [y]es, [n]o, > [A]ll, [N]one, [r]ename: A > gcj libswt.so > /home/jens/source/SwingWT/lib/linux_gtk2/libswt-atk-gtk-3111.so: could > not read symbols: File in wrong format > collect2: ld returned 1 exit status > make: *** [swt] Error 1 > seams to be an ld problem, which is probably related to gcj and 64bit > oder gcj und ld on 64bit. Is there anything I can try to? The compilation only handles the java elements of SWT and SwingWT itself - it still relies on the SWT GTK2 native libs which are precompiled 32-bit libraries (which are linked at the end). To solve, download the appropriate 64-bit SWT/GTK2 (3.1M5a) from http://www.eclipse.org and unpack it to the lib/linux_gtk2 directory. Make sure you don't overwrite the existing swt-source.zip file (since I patch it to work with GCJ) and re-run the make. Cross your fingers whilst you're at it (I don't have a 64-bit machine to test with) Good luck! Rob =20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org Animal Shelter Manager (http://sheltermanager.sourceforge.net) SwingWT (http://swingwt.sourceforge.net) I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |