swt

Uiautomatorviewer SWT exception

时光总嘲笑我的痴心妄想 提交于 2019-12-24 08:28:14
问题 Since StackExchange advised me to not ask for help or clarification on a previously existing post, I am making a new thread. On Windows 10x64 I downloaded the Eclipse SWT (in second-to-last section of Downloads page), set my ANDROID_SWT environment variable to <download location>\swt.jar , and have attempted to run uiautomatorviewer from cmd again, only to receive the same error message as when I tried to use the SWT bundled with eclipse: Error: A JNI error has occurred, please check your

Selected color of prompt/message in empty text box

限于喜欢 提交于 2019-12-24 07:38:44
问题 I want to create Text box with prompt when it is empty. I use setMessage method and it's working fine. How can I change default color of prompt? 回答1: If you want to change the color of the prompt, just add a Listener to the focus events. public class StackOverflow { public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setText("StackOverflow"); shell.setLayout(new GridLayout(1, true)); final Text text = new Text(shell, SWT

SWT SystemTray in OSX

吃可爱长大的小学妹 提交于 2019-12-24 07:26:11
问题 I'm trying to add a system tray icon to my Snow Leopard java application, which seems to work fairly well. Unfortunately, it seems like SWT does not align the systemtray icon with the top menubar, but instead aligns it with where my mouse clicked (e.g. http://kobyleha.com/files/azureus_2_250.png instead of http://kobyleha.com/files/power_250.png ... I am borrowing the images since this site describes similar problems) It seems to have been a problem with SWT since 3.3. I'm wondering if there

SWT Table with SWT.VIRTUAL raises StackOverflowError

僤鯓⒐⒋嵵緔 提交于 2019-12-24 04:05:16
问题 After recently installing Windows 7 Professional, I'm getting a strange problem removing a TableItem from a populated Table in SWT. It is specific to Windows 7 and to the SWT.VIRTUAL style constant for the table. Consider the following code: table = new Table(parent, SWT.VIRTUAL | Skin.SCROLL_STYLE | SWT.FULL_SELECTION | SWT.BORDER); TableItem item = new TableItem(table, SWT.NONE); item.setText("Table item"); table.remove(0); This causes a StackOverflowError as follows: Caused by: java.lang

Why do we still get SWT Invalid thread access Exception on Mac with -XstartOnFirstThread VM option?

我是研究僧i 提交于 2019-12-24 03:16:53
问题 I'm working on a context simulator named siafu, just the first step, try to build and run it on Mac OSX 10.6.8, but I'm confused that it fails to run with Exception: ***WARNING: Display must be created on main thread due to Cocoa restrictions. Exception in thread "GUI thread" org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.widgets

JavaFX/SWT WebView synchronous loadcontent()

安稳与你 提交于 2019-12-24 02:55:10
问题 I have embedded JavaFX's WebView in an Eclipse SWT application and need to load html content. I need to block the execution of the current thread until the webengine has finished loading the contents. Anyone familiar with this scenario and can give some hints and/or best practices to achieve this? It seems that both SWT and JavaFX run in the same UI thread. Thanks! 回答1: Show a modal window while the loading is not finished. You can not block the application thread because SWT/JavaFX operate

Transparent SWT Canvas

痴心易碎 提交于 2019-12-24 02:44:22
问题 I would like to make the background of an SWT Canvas transparent, so that other widgets can be seen behind it. I have tried setting alpha to 0 and filling the canvas with a rectangle and also using the option SWT.NO_BACKGROUND to no avail. 回答1: AFAIK, it is not possible with SWT to place widgets on top of each other in this way (in a cross-platform manner). Transparent backgrounds won't allow other widgets to be seen. Also any clicks on the transparent pixels won't be delegated to the widgets

Transparent SWT Canvas

一世执手 提交于 2019-12-24 02:44:07
问题 I would like to make the background of an SWT Canvas transparent, so that other widgets can be seen behind it. I have tried setting alpha to 0 and filling the canvas with a rectangle and also using the option SWT.NO_BACKGROUND to no avail. 回答1: AFAIK, it is not possible with SWT to place widgets on top of each other in this way (in a cross-platform manner). Transparent backgrounds won't allow other widgets to be seen. Also any clicks on the transparent pixels won't be delegated to the widgets

Java SWT browser: Waiting till dynamic page is fully loaded

血红的双手。 提交于 2019-12-24 02:44:04
问题 I'm working with SWT browser class and I have a problem. I'm trying to copy page source from a page in which most of the data is dynamically loaded with use of ASP. The problem is that the event completed of browser event listener is of course fired before the whole page content is displayed. Here is a part of my code: class GermaniaProgressListener implements ProgressListener { final Browser browser; Calendar calen; SimpleDateFormat dateFormat; static Integer counter; static Integer

Java Arabic (Hirji) Calendar

六眼飞鱼酱① 提交于 2019-12-24 01:44:24
问题 I've been trying to find good international Calendar support (Hirji included) for a mobile app. My main constraint is that the JVM is 1.3 and we've got AWT only. There is an option to move over to another JVM that gives us SWT, but I can't seem to find any international date pickers for either UI libs. I know Joda-time is available, but looking at the tech docs there doesn't seem to be a UI layer for it. So really, I want to know if anyone has come across a Hirji date picker for AWT or SWT.