SWT on any other IDE?


I've heard that SWT can only be developed in Eclipse... Is it true There should be some kinda SWT package available for Swing developers to develop in some other IDEs, not just in Eclipse...

Correct me, if I am wrong....

I was a die-hard fan of Swing in the past... But due to the performance and many other weaknesses of Swing, it seems like Swing is dying, at least in Thailand, where I am currently residing... As I've heard that SWT is the enhancement of Swing and its performance is far beyond that of Swing, I am really interested in SWT, even though it might not be directly related to my job functions... :roll:

Any comments are welcome....
Posted On: Tuesday 23rd of October 2012 11:31:20 PM Total Views:  180
View Complete with Replies

RELATED TOPICS OF Swing / AWT / SWT PROGRAMMING LANGUAGE




Eclipse swt property strings

hallo , 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 viewing the URL "+result.getString());
VIEWS ON THIS POST

68

Posted on:

Wednesday 17th October 2012
View Replies!

swt trayicon send sms

hi, need some help please with swt trayicon. I have a swt trayicon, that displays tooltip messages but what I want is to display an alert message to the user of the trayicon at specific times, for instance a message is displayed to the user "you have worked 6 hours" this message is to be displayed after 6 hours of the trayicon invoked to the "systray". I dont want to stop there though, I also want an sms sent to the users moblie phone telling the user 6 hours has pasted. my first question is possible with swt trayicon second question does anyone know of an example where trayicon alerts user with a trayicon message and trayicon sends a sms to the users mobile phone as usual any help would be much appricated.
VIEWS ON THIS POST

73

Posted on:

Wednesday 17th October 2012
View Replies!

swt.jar

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.
VIEWS ON THIS POST

71

Posted on:

Wednesday 17th October 2012
View Replies!

dynamically filling of embedded swt_awt frame

hello all, i wrote a plug-in which displays a empty awt frame within an editor (org.eclipse.ui.editors) by using the SWT_AWT bridge. by the using of plugin: exists any way to get the embadded frame from my open editor i want to load dynamically any awt-frames from any java-project. is that possible for suggestions
VIEWS ON THIS POST

71

Posted on:

Wednesday 17th October 2012
View Replies!

Exception in thread "AWT-EventQueue-0" org.eclipse.swt.SWTException: Invalid thread access

, For my application I have created a menu in the system tray. When you click left you get some dynamic data and when you click right on my menu you get a screen to add a new dynamic menuitem to my system tray menu. but when I try to add something to that menu I get this error: Exception in thread "AWT-EventQueue-0" org.eclipse.swt.SWTException: Invalid thread access this is my code: import java.awt.Frame; import java.awt.Dimension; import javax.swing.JButton; import java.awt.BorderLayout; import javax.swing.SwingConstants; import java.awt.event.KeyEvent; import java.awt.Rectangle; import javax.swing.JTextField; import javax.swing.JLabel; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; public class Test3 extends Frame { private static final long serialVersionUID = 1L; private JButton jButton = null; private JTextField txtInput = null; private JLabel lblInput = null; private JLabel lblResult2 = null; static Display display = new Display (); static Shell shell = new Shell (display); // @jve:decl-index=0: static MenuItem testMi = null; /** * This method initializes jButton * * @return javax.swing.JButton */ private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setHorizontalTextPosition(SwingConstants.CENTER); jButton.setMnemonic(KeyEvent.VK_UNDEFINED); jButton.setBounds(new Rectangle(504, 246, 97, 29)); jButton.setText("Click"); //jButton.setSize(0,80); //jButton.addActionListener(new java.awt.event.ActionListener()); jButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { //System.out.println("mouseClicked()"); // TODO Auto-generated Event stub mouseClicked() lblResult2.setText(txtInput.getText()); testMi.setText("Dynamic"); } }); //jButton.setRolloverEnabled(false); //jButton.setPreferredSize(new Dimension(50, 10)); } return jButton; } /** * This method initializes txtInput * * @return javax.swing.JTextField */ private JTextField getTxtInput() { if (txtInput == null) { txtInput = new JTextField(); txtInput.setBounds(new Rectangle(187, 73, 416, 22)); } return txtInput; } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Test3 application = new Test3(); application.initialize(); application.setVisible(true); Image image = new Image (display, 16, 16); final Tray tray = display.getSystemTray (); if (tray == null) { System.out.println ("The system tray is not available"); } else { final TrayItem item = new TrayItem (tray, SWT.NONE); item.setToolTipText("SWT TrayItem"); item.addListener (SWT.Show, new Listener () { public void handleEvent (Event event) { System.out.println("show"); } }); item.addListener (SWT.Hide, new Listener () { public void handleEvent (Event event) { System.out.println("hide"); } }); final Menu mainMenu = new Menu (shell, SWT.POP_UP); for (int i =0; i
VIEWS ON THIS POST

81

Posted on:

Wednesday 17th October 2012
View Replies!

org.eclipse.swt.SWTException

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 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 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) [ May 19, 2008: Message edited by: ramesh kancherla ]
VIEWS ON THIS POST

69

Posted on:

Wednesday 17th October 2012
View Replies!

flash video (FLV) player in swt or swing application

Is it somehow possible to play flv files in an eclipse rcp application (which is based on swt) without using a webbrowser viepart Or in swing If one takes the webbrowser viewpart you get all the functionality you don't want like the contect menu, hot keys and so on. And - most important - you are not platform independent since you need flash. I checked google nbut found nothing.. perhaps I should consider to switch to apple's quicktime format. tony roth
VIEWS ON THIS POST

114

Posted on:

Wednesday 17th October 2012
View Replies!

swt hyperlink

can anybody please tell me with an example how to provide hyperlink text using SWT.I mean on clicking the text it goes to web page, i got idea of using html,it worked ...but its nopt working when other components are used in SWT.
VIEWS ON THIS POST

83

Posted on:

Thursday 18th October 2012
View Replies!

ticking clock in a swt application

Hi everybody. I am building an SWT application which serves as a support for a board game (keeping score etc.) and as one of the features it contains a timer as a part of the interface. The idea is to have a label which displays seconds left of the clock and two buttons - start(stop) and reset. I know this is a typical threading problem - I just need a thread which would tick every second and notify the label about it. However I can't fathom how to code this. I have tried with Timer and TimerTasks, but I always seem to get "org.eclipse.swt.SWTException: Invalid thread access". Can someone please help me and tell me how to do this
VIEWS ON THIS POST

68

Posted on:

Thursday 18th October 2012
View Replies!

Modify the height of rows in swt Table

I am fetching how can i modify the height of rows in swt Table. I used this code : table.addListener(SWT.MeasureItem, new Listener() { public void handleEvent(Event event) { event.gc.setLineWidth(varWidth); event.height = varHeight; } but the problem is that i can just increase the height of rows but not decreasing it. Can someone help me!
VIEWS ON THIS POST

62

Posted on:

Monday 22nd October 2012
View Replies!

org.eclipse.swt.SWTException: Widget is disposed

I'm new to SWT technologie, and when I was tring to create a multi forms aplication, I created a Button that opens an other Shell object : Display display = new Display(); final Shell shell = new Shell(display); final Shell ajouterForm = new Shell(shell,SWT.BORDER|SWT.CLOSE);
VIEWS ON THIS POST

58

Posted on:

Monday 22nd October 2012
View Replies!

swt buttons wont right-align

Hi , Good Day.. I need to create a dialog box for user to enter their name and implemented gridlayout. I divide the shell widget into 3 columns and I want the first column be occupied by the label having it left aligned. Then I merge the last two columns and wanted the two buttons place right aligned into the shell. But my problem is, the GUI does not draws itself correctly. Here's my code. public void createGUI() { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Project1"); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.makeColumnsEqualWidth = true; layout.verticalSpacing = 20; shell.setLayout(layout); GridData gridData = new GridData(GridData.FILL_BOTH); Label label = new Label(shell, SWT.NONE); label.setText("Please Enter Your Name:"); label.setLayoutData(gridData); Composite composite = new Composite(shell, SWT.NONE); gridData = new GridData(GridData.FILL_BOTH); gridData.horizontalSpan = 2; composite.setLayoutData(gridData); layout = new GridLayout(); layout.numColumns = 1; composite.setLayout(layout); /**** Added to make it fit Label lblHidden = new Label(composite, SWT.NONE); gridData = new GridData(GridData.FILL_BOTH); gridData.heightHint = 1; lblHidden.setLayoutData(gridData); lblHidden.setVisible(false);*****/ gridData= new GridData(GridData.HORIZONTAL_ALIGN_END); Button cmdOK = new Button(composite, SWT.PUSH); gridData.widthHint =50; cmdOK.setLayoutData(gridData); cmdOK.setText("Ok"); Button cmdCancel = new Button(composite, SWT.PUSH); gridData= new GridData(GridData.HORIZONTAL_ALIGN_END); gridData.widthHint =50; cmdCancel.setLayoutData(gridData); cmdCancel.setText("Cancel"); gridData = new GridData(GridData.FILL_BOTH); gridData.heightHint = 15; gridData.horizontalSpan = 3; Text txtInput = new Text(shell, SWT.BORDER); txtInput.setLayoutData(gridData); shell.pack(); shell.open(); while(!shell.isDisposed()) { if(!display.readAndDispatch()) { display.sleep(); } } display.dispose(); }
VIEWS ON THIS POST

74

Posted on:

Monday 22nd October 2012
View Replies!

learning swt

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 learning Also, I learned about MVC in the Struts framework, I want to know also if MVC can be applied in swt desktop programming and perhaps learn how to implement it here.
VIEWS ON THIS POST

50

Posted on:

Monday 22nd October 2012
View Replies!

can anyone tell me books to refer for Swings

Need some input regarding the names of the books specifially for Swings. I am working with it, so I know the basics.But kindly suggest some book names which are not very huge .
VIEWS ON THIS POST

55

Posted on:

Monday 22nd October 2012
View Replies!

JFileChooser - Do not allow any input in the textfield

Hi , Need help with JFileChooser. When the filechooser is displayed, the user can either select a file or they can type in a file name and select Open to open the file. I do not want the user to be able to type in any filename in the textfield. Is there a way to disable the filename textfield, so that they can only select a valid existing file.
VIEWS ON THIS POST

43

Posted on:

Tuesday 23rd October 2012
View Replies!

any good open source swing library around here ?

Hi Swing gourous !! After 7 years of web development I've been sent in exile for my sins in the Swing world. Because I'm a lazy boy I'm used to use open source libraries. Do one you, swing gourous tamed by hundreds of years of Swing coding, happen to know one equivalent to Struts
VIEWS ON THIS POST

59

Posted on:

Tuesday 23rd October 2012
View Replies!

org.eclipse.swt.widgets.List - how to set visibile row count?

I am using an SWT List (org.eclipse.swt.widgets.List) and need a way to set the height of the list to say 10 items. JList has a method setVisibleRowCount(int). What can I do to achieve this same effect
VIEWS ON THIS POST

51

Posted on:

Tuesday 23rd October 2012
View Replies!

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

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 relate to each other ........ Java is new to me please help
VIEWS ON THIS POST

54

Posted on:

Tuesday 23rd October 2012
View Replies!

Table...editing in swt..

Tables in swt is quite pain in ... the class tableEdit is always generating errors in the debugger... is there a way to come over this...and can one add images to table cells or icons... thnx...
VIEWS ON THIS POST

45

Posted on:

Tuesday 23rd October 2012
View Replies!

swt + jface == swing ?

Hi ranchers. I heared a lot about SWT and JFace. would you mind explaining them to me I am familiar with Swing, can you tell me the equivalents of SWT and JFace in Swing world (I don't know, something like : SWT component are like Swing component , JButton, JLabel..... and JFace is like \t). If I have created a SWT application, and I want to package it and make it runnable (runnable Jar), can I include the required libraries and DLL files inside the Jar file if yes, please tell me how to configure the Jar file and perform the required steps (a tutorial,a link....)
VIEWS ON THIS POST

55

Posted on:

Tuesday 23rd October 2012
View Replies!