SWT 2 « Interoperability « Java Swing Q&A





1. SWT - Real experience ?    coderanch.com

2. what is swt?    coderanch.com

SWT is a native window toolkit originally developed by IBM, now owned by the Eclipse Foundation. It's been called "what AWT should have been." It's the GUI layer used by the Eclipse IDE, and you can build your own applications on it too. JFace is to SWT as Swing is to AWT -- it's a layer of fancier 100%-Java widgets built ...

3. what's the difference between swt/eclipse/Isaw...?    coderanch.com

Hi I know this may sound stupid but what's the difference between swt eclipse Isaw..or are they just additonal tools that supporting java and if I want to creat a user interface ..base on using java Like a login window would I choose any of these tools if not what can I do ....I also wants to know how(swt eclipse Isaw)they ...

4. About SWT & Database    coderanch.com

5. SWT Question    coderanch.com

6. difference between Swing, SWT and Jfaces?    coderanch.com

I havent been able to figure out what makes JFACE any easier to implement than SWT. It seems like it only saves you a few lines of code here and there. For example, JFace claims to streamline event handling by implementing the Action Class. But how is adding an "action class" any less tedious than adding an "action listener" ?

7. stand alone SWT application    coderanch.com

hi all i m tring to run swt app with a bat file but console also opens while .bat running what i m doing wrong , or what more should i do to stop that? also i need swt.jar for my app, & i m unnable to combine it with my jar i saw, there is lot at net , but ...

8. SWT application    coderanch.com

hi in swt ,we give Tool tip text, but i want to display more text. i want it that way, in a text field (preferably), when user mouse over, a pop-up type thing opens, which show some text (10 lines). what facility SWT provides for it, how can i do it, plz suggest! thnx

9. SWT viewer.getSelection    coderanch.com





10. Resource /org.eclipse.swt is not open    coderanch.com

In setting up a simple AWT app in Eclipse, I am following directions in one of the tutoials that comes with Eclipse to import the swt project (swt-3.1-win32-win32-x86.zip). When I try to do this, I get an error that says : Problems were encountered during import: Resource /org.eclipse.swt is not open. Resource /org.eclipse.swt is not open. Resource /org.eclipse.swt is not open. ...

11. Any framework for SWT standalone app?    coderanch.com

12. SWT: Is dynamic resize of Combo possible?    coderanch.com

Hi all, My scenario is : I have 2 combos in a Composite. Depending on the value selected in the first Combo, the second Combo is populated. Now the values in the second combo are of variable length, so i need to resize the combo depending on the length of the text. Is it possible, since we place the combos on ...

13. How to add Dynamic GUI components using SWT    coderanch.com

HI , I am new to SWT. Can anybody please help me out with this? I need to implement the following Group A text t1 text t2 List l1 Check Box c1, c2 c3 //Group A ends Button "Add New" Clicking on "Add New" paints the following Group A //with in Group A text t1_1 text t2_1 List list1_1 Check Box ...

14. SWT and SetWindowsHookEx (advanced question)    coderanch.com

Hi I'm trying to use SWT code to hook windows' keyboard (for instance - trap CTRL+ALT+DEL) Here is a snippet: int threadId = OS.GetCurrentThreadId (); Callback msgFilterCallback = new Callback(this, "msgFilterProc", 3); int msgFilterProc = msgFilterCallback.getAddress(); int filterHook = OS.SetWindowsHookEx (OS.WH_GETMESSAGE, msgFilterProc, 0, threadId); int msgFilterProc (int code, int wParam, int lParam) { System.out.println("Got a Message"); return OS.CallNextHookEx(filterHook, code, wParam, lParam); ...

15. SWT setFocus doesn't work    coderanch.com

16. SWT and Renderers?    coderanch.com





17. Reading Native SysTreeView using SWT    coderanch.com

Hi, Im trying to use the SWT api to read a SysTreeView from a native windows application. Have anyone tried this ?. When I call tree.getItems() my application crashes... getItemsCount() works fine. What am I missing. //SysTreeView32 Handle. int handle = 0x250658; Shell shell = new Shell (display); Tree tree = new Tree(shell,1); tree.handle = handle; //tree.setSize (100, 100); shell.setSize (200, ...

18. SWT/ DirectX    coderanch.com

19. SWT & SWING    coderanch.com

I have an application which essentially is a glorified graphics and text editor. The application is developed in SWING, however I have an SWT bubble (BalloonWindow) that displays a message to the user informing them, for example, a document they printed has been sent to the printer... however, the focus is taken from the editor pane, which is an internal frame, ...

20. Swt setup    coderanch.com

Hi, I am using my swt to develope some GUI, it work well with eclipse 3.0. I have just upgrade to 3.1.1. And when I run the code I have this error. Please help me to find out what is the problem. I have already search google.com and put dll files in windows/system32.... but it doesnt work. java.lang.UnsatisfiedLinkError: no swt-win32-3139 in ...

21. SWT's future    coderanch.com

23. Custom SWT component    coderanch.com

Hi, I want to create a custom component in SWT ,that is made of a control (eg button) and a drawing which should appear over the control. For instance , a custom component like this might be a button which has a line from one corner to the opposite one. Can anyone help me with this ? Many thanks.

24. SWT in JSP    coderanch.com

The truly simple answer is no. SWT is a desktop GUI API and, as was stated, JSP's are a server side technology. There are plenty of Javascript solutions for displayed trees on web pages if you google for it. As far as the SWT in an Applet goes, I wouldn't hold your breath. Using Java WebStart it would be possible though. ...

25. SWT - Dynamic Textboxes creation    coderanch.com

26. SWT Resource Monitor    coderanch.com

I am concerned that the application I am working on is not disposing of SWT resources properly. The application is quite large and it would be difficult for me to manually inspect everything. I am wondering if there is a good way to monitor the SWT resources on Windows. I have tried using a java profiler, but haven't noticed any memory ...

27. SWT ImageLoader bmps    coderanch.com

I have used Image, Imagedata amd Imageloader SWT classes succesfully on a windows machine to convert jpg to bmp amongst other things. I am porting my application to macosx, and it actually works, except for the jpg to bmp conversion. The bmps come out screwed up. Perhaps this could be do to the byte ordering deal of Intel to PowerPC? Thought ...

28. SWT: IColorProvider    coderanch.com

Hi, I have MyLabelProvider that extends LabelProvider and implements IColorProvider. I overwrite getBackgroundColor in MyLabelProvider: public class MyLabelProvider extends LabelProvider implements IColorProvider{ public String getText(Object element){ return "text"; } public Color getBackground(Object element){ Display display = new Display(); Color gray = display.getSystemColor(SWT.COLOR_GREEN); return gray; } public Color getForeground(Object object){ Display display = new Display(); Color white = display.getSystemColor(SWT.COLOR_RED); return white; } ...

29. sample swt progress display    coderanch.com

Hello. I have an swt app in eclipse that reads a large file. I'd like to display a progress monitor, but though I pass in the progress bar (only one thread.. probably my problem), the progressBar never updates visually. So I guess I need to run the whole kabloowy in a separate thread. Does anyone have a sample code set I ...

30. How to create a standalone SWT app ?    coderanch.com

31. SWT code not using a receiving object    coderanch.com

Hello, i am running this example in eclipse and it works fine, but i'm baffled by the strucuture of a particular statement: Please notice that the: "createMenuBar();" statement below does not have a receiving object, for example something like: "Menu m = createMenuBar(); and notice that the createMenuBar() funtion is returning a "Menu", but there isn't a Menu object on the ...

32. advanced SWT sample code    coderanch.com

Hi, I'm new to SWT (and to this forum, too)... Looking for some advanced SWT application with source code which I can use to study best practices. I haven't found any real useful stuff so far on the web. What I'm actually trying to do is to invoke a custom dialog box from the main window to set some "properties", put ...

33. on liveconnect for swt    coderanch.com

34. XML Colorer for SWT    coderanch.com

Does there exist a plugin or something that allows for an XML colorer for SWT. Basically, I'm trying to make a text compare dialog in SWT, but comparing two XML files, and was wondering if I could configure the TextViewer for the two compare panes to show XML coloring. Anybody have any ideas?

35. Region Leaks in SWT application    coderanch.com

Hi, I have worked upon an application in SWT. When i ran my application along with GDICount in order to track the OS resource usage and their leaks, i noticed my apllication is leaking Region resources like an open tap. But this leakage was only happening in winxp pro and not at all in win2k pro. In fact in win2k, it ...

36. Swing + SWT    coderanch.com

I have a Swing application that I need to pop up an SWT browser, and then be able to change the URL of the browser depending on settings in Swing. All examples of the SWT browser seem to be a simple single thread, completely pointless examples. If I try and create more than one SWT display, I get the JVM crashing. ...

37. Single API for both SWT and Swing?    coderanch.com

38. Problem with SWT    coderanch.com

39. [SWT] Creating a Tracker stops MouseUp    coderanch.com

Hey Folks, Take a look at this code snipet, creating a Tracker on MouseDown for some reason means that the MouseUp event is never captured. Any ideas why? Also, should I be closing and/or disposing the tracker directly after the open? Thanks public static void main(String[] args) { // new DragableComposite(); Display display = new Display(); final Shell shell = new ...

40. swt-designer (design view does not work)    coderanch.com

A friendly place for programming greenhorns! Big Moose Saloon Search | Java FAQ | Recent Topics Register / Login Win a copy of 12 Essential Skills for Software Architects this week in the Jobs Discussion forum or Head First HTML 5 in the HTML, CSS & JavaScript forum! JavaRanch Java Forums Java Swing / AWT / ...

41. Help reqd. - User Defined SWT - COMBO class & SelectionEvent    coderanch.com

Hi All, I'd appreciate any help and guidance w.r.t. the following. I have a User Defined COMBO class (SWT) which over-rides the default - addModifyListener(), addSelectionListener() , addKeyListener() and addMouseListener methods. The user defined COMBO class selects the drop-down list item based on user entry ( i.e. displays the first item in the drop-down beginning with the user typed character the ...

42. SWT Resources?    coderanch.com

I am new to SWT and have some experience with Swing/AWT. I was wondering if anyone can recommend a few books or resources for the following... 1. SWT in general; how-to; examples 2. SWT and Swing/AWT together; how-to get the two to work together; why they don't play well together and what to do about it For instance, I learned that ...

43. need SWT gui advice    coderanch.com

Hi I'm new to SWT and relatively new to GUI programming, that said I'm not a total newbie to programming I just work mainly with servlets etc. I've started creating a GUI and have some questions, I want to have a list of buttons down the left side of the gui, at the moment i have done this by creating a ...

44. swt styledtext search/find next    coderanch.com

Hi, I am new to SWT. I need to write a search/find next method for styledtext. I am creating a dialog box with a find button and search text. The example I found searches the whole styledtext and highlights the matches at once. How do I change this code to implement find next? Thanks import java.util.LinkedList; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import ...

46. Subclassing not allowed. SWT    coderanch.com

I want to wide the functionality of swt List by adding a couple of extra methods, but it says Subclassing not allowed. I can override checkSubclass to make it omit the deriving check, but as I understood thats not recommended. How actually dangerous is it and what is another way to extend standard widget functionality. Thanks in advice.

47. SWT is part of Swing?    coderanch.com

Swing (and AWT) come from Sun with the Java Standard Edition. SWT and JFace are alternatives to Swing and AWT. NetBeans is a free IDE that comes with a visual Swing designer tool. I've heard that NetBeans is pretty lame but I guess you could use it to generate Swing code and then use the Swing code in your favorite IDE. ...

48. SWT Standalone    coderanch.com

Hi, I'm new to Eclipse environment and I developed a small application using SWT. It works fine in the Eclipse IDE but when I export it as a JAR, it doesnt work at all. The problem is with the SWT Library, but I dont know how to fix it. How can I add the SWT Library into my jar file and ...

49. SWT (setControl() ) question .    coderanch.com

50. SWT or Swing    coderanch.com

51. How to download the SWT Javadoc!?    coderanch.com

52. learning swt    coderanch.com

Hi Everyone, Good Day.. I was given a task to customize a project that was written in a foreign language. As I browse all the classes, it was well written in SW. I dont know SWT so I am thinking about buying a book about it. Could you suggest me what good book to start with and also online resources for ...

54. Problem running swt in command line    coderanch.com

56. Define a global hotkey in SWT/RCP    coderanch.com

Hi there, I figured out how to get an RCP a tray icon. Now I need to figure out how to define a global hotkey. What I want to achieve: - Minimize an Eclipse RCP to the system tray - Work with other stuff - Hit the hotkey (e.g. Ctrl+G ) and bring up one dialog window of the application (or ...

57. SWT UI supports    coderanch.com

Hello guys I am using SWT to develop an application for windows. But I don't wan't the UI to be changed in diffrent operating systems. Is there any way to set a permanent Look and Feel for SWT, Also Is it possible to change the look and feel for SWT, such as jgoodies exist for Swings. I don't want to use ...

58. org.eclipse.swt.SWTException    coderanch.com

i created one thread and in that thread i am creating another thread but i am getting this exception 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.Display.error(Unknown Source) at org.eclipse.swt.widgets.Display.checkDevice(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at chrriis.dj.nativeswing.NativeInterfaceHandler.dispatch(NativeInterfac eHandler.java:300) at chrriis.dj.nativeswing.NativeInterfaceHandler.runEventPump(NativeInte rfaceHandler.java:293) at com.instacoll.livedocuments.oo.userinterface.ManageDocuments.showMana geApp(ManageDocuments.java:1615) at com.instacoll.livedocuments.oo.miscellaneous.InstaSecureTray$3$1.run( InstaSecureTray.java:208) org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(Unknown Source) at ...

59. How to setup proxy settings in SWT application    coderanch.com

We have an SWT touchscreen application up and running remotely. Application interacts with the back-end server thru webservices. Now for few terminals, we need to set proxy for client application to interact with the back-end server. Currently, we are using direct calls to webservice [not thru proxy] I need some examples, how to implement this proxy settings. Ideas on this implementation ...

60. New To SWT    coderanch.com

Hi All, I am new to SWT.I have been using an editor wherein if i do some changes i need to save the changes by clicking ctrl-s. I am able to do the same with addition of a button and setDirty method. but i dont how ctrl-s will be recognized as an event and i can save the changed state.

61. Tread Access in SWT    coderanch.com

62. SWTBot for Testing SWT Application    coderanch.com

63. SWT    coderanch.com

64. SWT_AWT Assistance    coderanch.com

I'm wondering if anybody can provide thoughts on what's happening below. I am very new to SWT and AWT but have to get an ESRI GIS app ported to Linux. This occured when i moved an eclipse RCP app from XP to RHEL 4.7 / Jre 1.5 and i'd like to know what's going on. Any help would be greatly appreciated. ...

65. Need help in SWT Form    coderanch.com

Hi , i am developing a Plugin for eclipse 3.4 using SWT. I am adding a page in the eclipse preference. There is table and button in the that Page. On clicking the button a form with some fields need to be displayed as a dialog box. The value in the dialog box must be set in the table. I tried ...

66. SWT and swing    coderanch.com

Originally posted by sheng zhong: What's the difference of swt and swing? When I edit a GUI java file, why there is a switch from swt to swing or swing to SWT? Swing/AWT is the GUI toolkit that is packaged with Java. AWT being the lower level library, and Swing the library that sits ontop of it. SWT is a alternate ...

67. SWT + Eclipse RCP + Chess    coderanch.com

Hi there, I have recently started working in SWT, have been long working in Swing. Basically what my goal is to develop a Chess game for online-game play on popular chess servers like FICS, ICC, there is another open source client (pretty good) developed in java swing available by the name JIN, perhaps you know of it too. I do like ...

68. [SWT] How to detach view    coderanch.com

70. Setting number of items to show in SWT List    coderanch.com

I have 200 items in my list and all the items show up on the screen. But, I want only to have 10 items to be visible and then have vertical scrollbar. How do I achieve this? I tried setting the bounds but that did not work. I'm using SWT inside eclipse forms. Below is my code. Any suggestions? final Label ...

71. no resize in SWT    coderanch.com

72. setFocusableWindowState(false) and SWT    coderanch.com

73. Should I select Swing or SWT ?    coderanch.com

Hello I am interested in developing a GUI Application for Windows (i.e. for using JDBC later on) and i am complete beginner. I would like to know which GUI programming would be viable in the long run. I have read that there isnt much development going on at Swing ? So I am a little concerned, if i start off with ...

75. Problem creating a dynamic form with SWT    coderanch.com

Hi Everyone, I am facing a problem while making a dynamic form. What I am trying to do is to make a part of the form dynamic, i.e. it can have different controls depending upon the content available. If an image is available, then we have to display the image and the associated information. If the image is not available, then ...

76. Animating a line in SWT showing a route in real time    coderanch.com

Hi everyone! This is my first post. JavaRanch has always been my no. 1 or 2 source for problem solving. Hope you can help me with this one. The challenge here is probably due to my limited SWT knowledge. What I need to do is once having, let's say a map as a background image in a canvas for instance, is ...

78. swt.jar    coderanch.com

This is the first time I use SWT, please see the following program. I don't have swt.jar in my system. Would anyone instruct me how to make it work. I know I need swt.jar in my system. Where can I download the jar file and how to install it. Thanks in advance. import org.eclipse.swt.widgets.*; import org.eclipse.swt.*; public class SWTHello { public ...

79. how to select a block using awt inside an swt component    coderanch.com

Hello Everyone, I am working on eclipse rcp application. I created my own plugins with views. In my plugins code I developed gui using swt where as for my canvas I used awt. I added awt inside my swt app. In one of my plugin canvas I created a quilt in which I divided my quilt into few rows and columns ...

80. How to set up Eclipse SWT?    coderanch.com

Hello, I downloaded eclipse-jee-helios-linux-gtk.tar and installed it on my machine (Xbuntu 10.4). It runs, but it appears SWT is not configured, and I can't find mention of an SWT layout tool for designing. I'm very surprised the SWT jars are not configured - isn't this Eclipse's approach to GUIs? And so I think there must be something wrong with the file ...

81. [SWT] flexibility of an expandbar (remove expanditems?)    coderanch.com

Hi all, I am trying to create an application with multiple chats for some kind of support system. Therefore I use a tabfolder with two tabitems, one with answered threads, one with new threads. On each of the tabitems I have an expandbar with multiple expanditems (with chatboxes on them) My problem lies in moving a thread to the 'read' tab. ...

83. (SWT) Show specific part of multiselect list    coderanch.com

Welcome to the Ranch. I have never worked with SWT, but presuming its similarities with Swing, one way of meeting your requirement is to change the sequence of your list items. Selected items are grouped together at the start of the list. Does this answer your question or did I misunderstand your requirement?

84. SWT system sounds    coderanch.com

void beep(): Causes the system hardware to emit a short sound if it supports this capability. other that that you would have to find the sound files in your C drive somewhere and play them. However then you get platform dependency issues, and would have to do the same thing for every platform. I'd personally just go with a beep, or ...

85. making SWT aplication look sleek/cool    coderanch.com

Hi I have developed this simple/basic SWT application. The app has a few browse button to upload the input file and spits out an output file. With File/menu items Just like how Javascripts/JQuery kind a gives cool/Sleek look to the plain old HTML pages, is there any thing like that for Java desktop SWT apps? thanks in advance!

86. SWT XML Sprite Sheet Utility    coderanch.com

I'm trying to create a class, which will take a path to an Image, and an XML file which defines sub-images within the image, and return each sub image as SWT Image objects. It basically should work like this String xml = "data/menu.png.xml"; String image = "data/menu.png"; final XMLSpriteSheet testSheet = new XMLSpriteSheet(display, image, xml); GC.drawImage(testSheet.getSprite("play.png"), 0, 0); with the XML ...

87. Pagination in SWT. Is it possible ?    coderanch.com

88. export SWT to XML    coderanch.com

Hi all, I finished a project using SWT designer under Eclipse; I wish to export it to a .xml file. I found a few software to perform the exportation, but I want to ask what is the fastest and easiest one to use. If someone can advise me of a plugin or a certain software to use, I would really appreciate ...

89. Swing and SWT    coderanch.com

90. Doo we have good charting framework for SWT?    coderanch.com

Hi Friends, Our project require line chart for SWT with same functionality as it is available on JFreeChart. We cant use JFreeChart for swt, as our application have little bit more data and this may have some performance issue, so want to some core swt charing framework. I tried with SWTChart but this have less features. Please suggest some other charting ...

91. SWT MessageBox on mac    coderanch.com

Hey guys! So....I'm making a MessageBox dialog for a user to confirm whether or not they want to do something. Calling it as such: MessageBox confirmDeleteMessageBox = new MessageBox(table.getParentControl().getShell(), SWT.ICON_WARNING| SWT.OK | SWT.CANCEL); On windows, it looks perfect, the warning icon shows up in the dialog and everything. HOWEVER on the mac (GRRRRRRR) , the icon that shows up is the ...

92. Eclipse swt property strings    coderanch.com

hallo everyone, im working with eclipse swt to embed office files into jframes, is there a way to know all the property strings one can change, for example when you write: OleControlSite controlSite = new OleControlSite(frame, SWT.NONE, "Shell.Explorer"); OleAutomation automation = new OleAutomation(controlSite); int[] rgdispid = automation.getIDsOfNames(new String[]{"LocationName"}); int dispIdMember = rgdispid[0]; Variant result = automation.getProperty(dispIdMember); System.out.println("The Web Browser is currently ...

94. SWT resize/modal question    coderanch.com

Hello All, I'm pretty new [started today] to SWT framework. I have tried to create a UI via eclipse using the windows builder plugin. The code goes something like this. package com.teamcenter.rac.pse.revisionrules; import com.teamcenter.rac.kernel.TCComponent; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import ...

95. SWT TreeView    java-forums.org

I am using a treeview to display the file system. If i create a new file and refresh the viewer the new file is there. I need to set the selection in the viewer to that file though and only have the path and filename. How can I set the selection? Thanks

96. difference between swing and swt?    java-forums.org

There is a good article at: developer.com/java/other/article.php/10936_2179061_1 Basically Swing came first and it was written by Sun. Every widget is emulated, ie. not native OS code. The first few versions were not very fast and sometimes didn't match the look and feel of the OS. IBM came along with Eclipse and wanted a faster, more native looking set of widgets and ...

97. Swing/SWT in NetBeans IDE    java-forums.org

I'm not expert in this but I would guess that no, it's not easily done or even possible in a reasonable way. NetBeans is based on Swing, may even be written in Swing. If you really desire using SWT, I would suggest that Eclipse would be a better option than NetBeans since it was built with SWT and integrates well with ...

98. Design of Application (Swing/SWT)    java-forums.org

ok - that is now done.. thx but a next question: on the left side - de navigation menu, there are e.g Create new Shipment or Delete shipment. this aren't buttons - but what else? how could i do this? thx 4 help ps: how is a header like this possible? in the screenshot: Sea Export Tasks or Quick Start?

99. using awt inside an swt component    java-forums.org

Hello Everyone, I am working on eclipse rcp application. I created my own plugins with views. In my plugins code I developed gui using swt where as for my canvas I used awt. I added awt inside my swt app. In one of my plugin canvas I created a quilt in which I divided my quilt into few rows and columns ...

100. SWT & Swing Bridge problem    java-forums.org