swt

How do you force a java swt program to “move itself to the foreground”?

我与影子孤独终老i 提交于 2019-12-29 05:07:05
问题 Currently with swt, I sometimes want a program to arbitrarily come to the foreground (like an alarm clock might). Typically the following works (jruby): @shell.setMinimized(false) @shell.forceActive This brings the shell to the front if it was minimized. Creating a new shell at any time also brings the (new shell) to the front. So far so good, however, if the shell is not minimized, the above code just flashes (blinks) the app's icon in the taskbar. Well actually the first time you run it, it

Packaging Java apps for the Windows/Linux desktop

吃可爱长大的小学妹 提交于 2019-12-28 03:20:27
问题 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 feel that packaging an application is still an issue. OS X natively provides an easy mechanism for wrapping Java apps in native application bundles, but producing

Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )

六月ゝ 毕业季﹏ 提交于 2019-12-28 02:06:19
问题 I'm trying to debug this problem but not sure where exactly i need to replace SWT jar file for Eclipse. Current System Config: Eclipse Helios 3.6 - 32 Bit JDK 1.6 JVM - 32 Bit Windows 7 - 64 Bit Error Message: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174) at org.eclipse.swt.internal.C.<clinit>(C.java:21) at org.eclipse.swt.widgets

Invalid Thread Access Error with Java SWT

浪子不回头ぞ 提交于 2019-12-27 11:45:05
问题 I have a simple Java SWT app in Java so far but the weird thing is when I try to launch a messagebox/alert box upon listening to an event fired by one of my own classes, I get an error saying "Invalid thread access". My class event is fired and heard by the main class but it is when it has to show the MessageBox that the "Invalid thread access" error appear. I am trying to show the MessageBox in a function that consist of all the other codes that will create the SWT GUIs. This is how the

Invalid Thread Access Error with Java SWT

让人想犯罪 __ 提交于 2019-12-27 11:44:28
问题 I have a simple Java SWT app in Java so far but the weird thing is when I try to launch a messagebox/alert box upon listening to an event fired by one of my own classes, I get an error saying "Invalid thread access". My class event is fired and heard by the main class but it is when it has to show the MessageBox that the "Invalid thread access" error appear. I am trying to show the MessageBox in a function that consist of all the other codes that will create the SWT GUIs. This is how the

SWT 重启案例分析(三)

a 夏天 提交于 2019-12-26 09:53:11
极力推荐文章:欢迎收藏 Android 干货分享 阅读五分钟,每日十点,和您一起终身学习,这里是程序员Android 本篇文章主要介绍 Android 开发中的部分知识点,通过阅读本篇文章,您将收获以下内容: 一、 高温触发 Kernel Exception 重启问题 二、解决方案 三、提高电池温度方案 一、 高温触发 Kernel Exception 重启问题 手机 电池温度 默认 60 度以上高温会触发手机安全机制,让手机管家或者重启。 由温度异常导致手机重启的部分 Log 如下: 二、解决方案 此问题 需要驱动同事修改底层 battery.c 文件中的一个地址,不让其写为 dead ,就不会重启。或者提高电池温度参数。 三、提高电池温度方案 提高电池温度的方案如下: 1.修改 mtk_battery_table.h /alps/kernel-4.4/drivers/misc/mediatek/include/mt-plat/mt6739/include/mach/mtk_battery_table.h * ============================================================ */ +//#define SPROCOMM_NTC //wang add +#ifdef SPROCOMM_NTC +#define NTC_COMP

How to make JavaC copy existing class files to the target dir?

半城伤御伤魂 提交于 2019-12-25 17:19:09
问题 I hope somebody can give me an advice... Problem In source directory of my project some packages contain resources which are not ".java"-files. Now I need to put there compiled ".class"-files. The problem is that ANT filters them out when I am building the final JAR. ".dll" and ".png" files are not filtered out. How can I achieve that everything is copied to the target directory? I use following Ant task: <javac srcdir="${src}" destdir="${temp}" target="1.5" encoding="8859_1" debug="${compile

How to make JavaC copy existing class files to the target dir?

匆匆过客 提交于 2019-12-25 17:18:15
问题 I hope somebody can give me an advice... Problem In source directory of my project some packages contain resources which are not ".java"-files. Now I need to put there compiled ".class"-files. The problem is that ANT filters them out when I am building the final JAR. ".dll" and ".png" files are not filtered out. How can I achieve that everything is copied to the target directory? I use following Ant task: <javac srcdir="${src}" destdir="${temp}" target="1.5" encoding="8859_1" debug="${compile

How to get return value to eclipse function from java script function which get data from ajax request using SWT browser?

假如想象 提交于 2019-12-25 09:25:53
问题 I have tried below.... I have this in eclipse : I have a button in java which triggers this function in javascript Object status = browserCtrl.evaluate("return atm.java.webToJavaPerspective()"); Then I have this function in javascript function atm.java.webToJavaPerspective(){ returnData = {}; //ajaxRequest = some ajaxRequest variable $.when(ajaxRequest).then(function( data, textStatus, jqXHR ) { //modify the data returnData.textStatus = textStatus; //this return statement should return data

How to add image on the right side of the table column and table cell using SWT in java

梦想的初衷 提交于 2019-12-25 09:17:16
问题 How do I add image to the right side of the table column retaining the Text to the left. below is the code TableColumn tc = new TableColumn(this.table_for_list, SWT.LEFT); tc.setText("List"); for (int i = 0, n = this.table_for_list.getColumnCount(); i < n; i++) { this.table_for_list.getColumn(i).pack(); } TableItem item = new TableItem(this.table_for_list, SWT.NONE); item.setText(0, "List 1"); TableItem item2 = new TableItem(this.table_for_list, SWT.NONE); item2.setText(0, "List 2"); Table