swt

Packaging Java apps for the Windows/Linux desktop.

I am writing an application in Java for the desktop using the Eclipse SWT library for GUI rendering. I think SWT helps Java get over the biggest hurdle for acceptance on the desktop: namely providing a Java application with a consistent, responsive interface that looks like that belonging to any other app on your desktop. However, I fe...

Libraries for pretty charts in SWT?

I know the following libraries for drawing charts in an SWT/Eclipse RCP application: Eclipse BIRT Chart Engine (Links to an article on how to use it) JFreeChart Which other libraries are there for drawing pretty charts with SWT? Or charts in Java generally? After all, you can always display an image... ...

Prevent SWT scrolledComposite from eating part of it's children

What did I do wrong? Here is an excerpt from my code: public void createPartControl(Composite parent) { parent.setLayout(new FillLayout()); ScrolledComposite scrollBox = new ScrolledComposite(parent, SWT.V_SCROLL); scrollBox.setExpandHorizontal(true); mParent = new Composite(scrollBox, SWT.NONE); scrollBox.setContent(mParent)...

Setting Colors in SWT.

This is pretty simple, I come from a swing/awt background. I'm just wondering what the proper way to set the background color for a SWT widget is? I've been trying: widget.setBackGround( ); Except I have no idea how to create the color Object in SWT? Thanks, Brian Gianforcaro ...

What is the best OpenGL java binding?

I am trying to achieve better performance for my Java SWT application, and I just found out it is possible to use OpenGL in SWT. It seems there are more than one Java binding for OpenGL. Which one do you prefer? Note that I have never used OpenGL before, and that the application needs to work on Windows, Linux and Mac OS X. ...

What's the best way to return variables from a syncExec?

In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is: final ArrayList<Integer> result = new ArrayList<Integer>(); GUI.display().syncExec(new Runnable(){ public void run() { MessageBox mb = /* ... */; /* set up messagebox */ result.add(mb.open...

Is there an RTF display widget in SWT

I would like to display an RTF document in an SWT (actually Eclipse RCP) application. I know there is a Swing widget for displaying and editing RTF text, but it is Swing and quite alien in look and feel when used in the otherwise platform (not to mention that to the last of my knowledge it did not display images and had only limited sup...

org.eclipse.swt.SWTError: Item not added

Does somebody know how to recover a never-starting eclipse when the error "org.eclipse.swt.SWTError: Item not added" is raising againg and again? I'm using WebSphere Studio Site Developer (Windows) 5.1.0 The only stack trace in the .metadata/log file is: SESSION ---------------------------------------------------------------------- !E...

Has anyone got an example of aerith style swing mixed with GUI maintainability of SWT editing?

My boss loves VB (we work in a Java shop) because he thinks it's easy to learn and maintain. We want to replace some of the VB with java equivalents using the Eclipse SWT editor - because we think it is almost as easy to maintain. To sell this - we'd like to use an aerith style L&F. Can anyone provide an example of an SWT application s...

A more advanced table/spreadsheet SWT implementation

I'm developing an application based on Eclipse's Rich Client Platform that relies heavily on the use of tables for showing and editing data. I'm currently using the SWT implementations of Table and TableViewer. My users are forever complaining that it "doesn't work like in excel". Most notably, I can't select a single cell within a row...

How to have a Label inherite a Composite's GC in SWT

I'm writing an app and our designer's want to user gradient's for some of the backgrounds on a few of our composite's. I wrote the following code: composite.addListener (SWT.Paint, new Listener () { public void handleEvent (Event e) { GC gc = e.gc; Rectangle rect = composite.getClientArea (); Color color1 = new Color (displa...

Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION?

When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always caused by a bug in the JVM, or are there other causes like malfunctioning hardware or software conflicts? Edit: there is a native component, this ...

Eclipse RCP Toolbar buttons with the Eclipse Look

In Eclipse, its easy to specify buttons for your toolbar using the ActionSets extension point. However, when I need to specify some items programmatically, I can't get the same look. I don't believe that the framework is using native buttons for these, but so far, I can't find the right recipe to match the Eclipse look. I wanted to se...

SWT Link flickers with gradient background

I'm developing a an eclipse plugin that uses an SWT interface. I need to display text, and within that text there needs to be links. The only two widgets that I've found that will allow me to include clickable links in text are Link and Browser. Browser, however, is overkill for my needs, and I couldn't properly customize the look of ...

Overcoming Windows User Object Handle Limit

I'm looking for advanced strategies for dealing with User Object Handle limits when building heavy-weight windows interfaces. Please explain how you overcame or bypassed this issue using SWT or direct Windows GUI APIs. The only thing I am not interested in is strategies to optimize widget usage as I have done this extensively and it do...

which library better for faster java application swt or swing?

which library better for faster java application swt or swing? ...

SWT - OS agnostic way to get monospaced font

Is there a way in SWT to get a monospaced font simply, that works across various operating systems? For example. this works on Linux, but not Windows: Font mono = new Font(parent.getDisplay(), "Mono", 10, SWT.NONE); or do I need to have a method that tries loading varying fonts (Consolas, Terminal, Monaco, Mono) until one isn't nu...

Catching window.print() from SWT Browser

Hi, I 'm exploring for a browser solution / API that has the following features: Must support the nowadays default web technologies Must support client side XSLT Must support executing arbitrary Javascript on the pages it loads Must be able to catch events from the web page targeted to the browser or OS (I am specifically interested in...

Menu item accel key works only after menu item has been shown.

Hi, I'm developing a SWT/JFace application using the libraries from Eclipse 3.4.1. I encounter the following problem on Windows (Vista 32bit) and Ubuntu 8.10 32bit: I create a menu bar in the createMenuManager method of the JFace ApplicationWindow. I add MenuManagers for file, edit and help. I then add an ExitAction to the file MenuMa...

Eclipse 3.4 TextViewer

I am creating a plugin for Eclipse 3.4. I created a plug-in development project using the application with a view. Now I am trying to create a TextViewer the documentation says that it is located in org.eclipse.jface.text.TextViewer. But, this whole package is missing and eclipse cannot locate TextViewer class to import. I want to kn...