Results 1 to 1 of 1
Thread: Using SWT Text
-
Using SWT Text
Code snippet below includes a class that shows how to use Text class in SWT.
Java Code:import org.eclipse.swt.widgets.*; public class SWTText { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); Text text = new Text (shell, 0); text.setText ("ASDF"); text.setSize (64, 32); text.selectAll (); shell.pack (); shell.open (); while (!shell.isDisposed()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } }
Similar Threads
-
Text Animation
By rossomandop@acm.org in forum AWT / SwingReplies: 4Last Post: 05-30-2008, 03:34 AM -
Reading text from a URL using BufferedReader
By Java Tip in forum Java TipReplies: 0Last Post: 12-26-2007, 10:17 AM -
how to set indentation to a text
By elizabeth in forum New To JavaReplies: 1Last Post: 08-06-2007, 06:42 PM -
map javax.swing.text.Element to javax.swing.text.View
By elizabeth in forum New To JavaReplies: 1Last Post: 07-30-2007, 07:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks