Results 1 to 1 of 1
Thread: SWT Event Handling
-
SWT Event Handling
Review the code below.Events from the operating system's event queue are read by readAndDispatch and then dispatches them appropriately.
Java Code:import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class SWTEventHandlingDisplay { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Hello, world!"); shell.open(); while(! shell.isDisposed()) { // Event loop. if(! display.readAndDispatch()) display.sleep(); } display.dispose(); } }
Similar Threads
-
session handling
By priyanka_t in forum JavaServer Pages (JSP) and JSTLReplies: 10Last Post: 08-11-2009, 12:32 PM -
Event
By nt5515 in forum New To JavaReplies: 0Last Post: 02-15-2008, 04:44 PM -
Combo Box Event handling
By smajidali26 in forum AWT / SwingReplies: 1Last Post: 11-29-2007, 05:57 PM -
problem with event handling!!!
By ahdus in forum Java AppletsReplies: 1Last Post: 11-17-2007, 06:24 PM -
Event Handling
By luisarca in forum Sun Java Wireless ToolkitReplies: 5Last Post: 05-07-2007, 06:05 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks