swt

Java SWT - Repainting a canvas after a resize

I have a shell that contains a canvas, which in turn draws some text in its PaintListener. The problem is, when I dynamically reduce size of the shell with its setBounds method (this is going to happen every once in a while), the text doesn't get redrawn. In fact, the canvas' PaintListener doesn't get called again. Is there a way to for...

Java UnsatisfiedLinkError when mixing AWT and SWT?

I'm an Eclipse newbie and I'm trying to build a mixed AWT/SWT application. Here's my code: public class HelloWorldSWT { public static void main(String[] args) { Frame frame = new Frame("My AWT Frame"); // java.awt.Frame frame.setLayout( new BorderLayout() ); Canvas canvas = new Canvas(); // java.awt.Canvas ...

[Java2D] Resize problems

Hi gentlemens (and ladys) I am currently creating an Eclipse View that has to contribute an Eclipse RCP app' and which must be nice (and only this one, I don't need an eclipse skin or something like that because my eclipse RCP app must look the same as a regular eclipse app), I must integrate translucent png, mouving gradients and contr...

SWT. How to create Composite object witout parent

Hi, I write a project in Java using SWT. I would create temporary container for some controls. How to create composite control without parent object? Sincerely, mykhaylo ...

Compare SWT with SWING

Is swt faster than swing? Where can i get good tutorials about swt? it easy to migrate from swing to swt? ...

Java SWT interop with COM - putting a float[] into a Variant?

In my Java SWT application I'm hosting an 3rd party ActiveX control. I'm using OleClientSite to do this. // Ah, this works. :-) OleAutomation comObject = new OleAutomation(...); There are 2 easy little functions I want to call from Java. Here are the COM function definitions: [id(5)] void easyFoo([in] int blah); [id(20)] void proble...

Best place to save program config file on Windows and OS X using Java?

I have a SWT Java app that runs on Windows XP / Vista / 7 and Mac OS X. I'm currently saving a config file to: System.getProperty("user.home") + filename With the changes in security in Windows Vista and Windows 7 this doesn't seem to be the best place to save it anymore. This file saves information such as registration key info and i...

SWT Browser Problem on Vista

We're running Java Swing and are using an SWT bridge to get ahold of the SWT browser. Everything normally works just fine, but we have a problem on a Vista test machine. It worked fine until just a week ago or so. The call stack: org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:3589) at org.eclipse...

How to update a GUI from another thread in Java

Hi, I am writing a desktop application using SWT. What is the simplest way to update GUI controls from another thread? ...

Deploying an SWT application on Java Webstart

Is it possible to deploy SWT applications using JNLP. Especially loading the swt native library (dll in Windows, so in Linux)? Any links? I found one at IBM Developer Works, however it just describes using swt.jar. In addition to that, is it possible to load the native dll files over JNLP? ...

EditingSupport's ComboBoxCellEditor won't call setValue until it loses focus

This is using SWT, jface and eclipse 3.4. I've set up a tableviewer with EditingSupport, and a ComboBoxCellEditor. When I change the selection in the combobox and then click outside the combobox to deselect it, that's when it calls setValue in the EditingSupport. However, I have this setup in a Dialog, and if I change the selection in ...

Keyboard Navigation and Accessibility for custom SWT widgets

I am trying to build a simple custom SWT widget and i want to ensure that it is accessible. I know that accessbility encompasses a lot of factors, but as a starting point, i would at least like to make it navigable via the keyboard. This is a simplified view of my custom control. I have overridden the 'Canvas' class in SWT. The 'Thir...

Get task manager list via SWT?

Is there a way using SWT to get a list of all processes currently running (similar to executing tasklist.exe/tlist.exe on Windows)? If so, is there sample code available? Ideally this would be done programmatically only (no third party tools). My app monitors the process list and needs to support Windows 2000/Server 2003/XP Home/XP Pr...

Setting SWT tooltip delays

Is it possible to change the tooltip delay in SWT? In Swing, I would normally use the methods in Tooltip.sharedInstance(). This seems to break in SWT. ...

best resources to start programming eclipse plug-ins

Either books (free or not), online tutorials, articles, etc. ...

SWT Setting Column Height or insert new line

I currently have a Table [org.eclipse.swt.widgets.Table] with several TableColumns; however, due to UI space restrictions I have a bit of an issue. Lets say for example I had a table column named "Target User" and this couldn't be named anything else AND the whole display "Target User" had to be displayed. Now lets say I also have sev...

IllegalArgumentException when setting Image in Jigloo

I am trying to make GUIs in SWT using Jigloo and when I want to set images to Labels or Buttons, I can see them in the preview pane. However, when i compile and run it, it throws SWTResourceManager.getImage: Error getting image img/game/front/test.png, java.lang.IllegalArgumentException: Argument cannot be null The code it generates l...

How to resolve AssertionFailedException

Hopefully someone can point me in the right direction. I'm trying to create a CellEditor in Eclipse and when I click on the field I get an Unhandled event loop exception with the stack trace below. The cell editor code for this column looks like this /** Cell Editor Row 2 **/ textEditor = new TextCellEditor(table); ((Text)textEditor....

Java SWT app with transparent background on OSX - transparency issues

I have an SWT app that has been developed on win32 and is now being ported to OSX. Everything works smoothly except for some visual quirks and one annoying problem. The shell for this app is an image with rounded corners, so I'm using some code taken from one of the SWT snippets to create a shell with rounded corners. For some reason, w...

CheckboxCellEditor shows text and not a check box

I'm using the following org.eclipse.jface.viewers.CheckboxCellEditor.CheckboxCellEditor(Composite parent) I'm creating a table viewer with cellEditors and doing the following CellEditor[] editors = new CellEditor[columnNames.length]; editors[7] = new CheckboxCellEditor(table); I have a CellModifier that has the following public Ob...