Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Java Native Interfaces with SWT/JFace Discuss the book Professional Java Native Interfaces with SWT/JFace, by Jackwind Li Guojie, ISBN: 0-470-09459-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Java Native Interfaces with SWT/JFace section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 19th, 2008, 04:07 PM
Registered User
Join Date: Sep 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default WrapLines.java example not wrapping text


I ran the chapter 8 example in the Java Native Interfaces book that is supposed to show how to create a multi-line text box with line wrap in Java SWT. However, the text isn't wrapping...


I am running the example in com.asprise.books.javaui.ch08.WrapLines.java. In Fig 8-1 on pg 178 it shows a window with two text boxes. The left text box does not wrap text, the entire text appears on 1 line. The right text in this picture shows a multi-line text box where the text is wrapping, as one would expect. Naturally I expected the example code to create a window that looked like this picture...

However, when I run the example, neither of the text boxes wraps text. The left and right text boxes appear identical. This is odd, since the right text box constructor is passed the SWT.WRAP flag.

Any ideas?


I am running

java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

on Ubuntu 8.04

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text wrapping abhilasha_dubey JSP Basics 1 October 26th, 2007 12:03 AM
text wrapping and controls clinging to left of pag cathiec Visual Studio 2005 0 August 10th, 2005 11:19 AM
"Text-wrapping" bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 28th, 2005 11:53 PM
Text Wrapping within a Table spraveens HTML Code Clinic 1 March 15th, 2004 05:47 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.