p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Java Native Interfaces with SWT/JFace (http://p2p.wrox.com/forumdisplay.php?f=166)
-   -   WrapLines.java example not wrapping text (http://p2p.wrox.com/showthread.php?t=70682)

red5 September 19th, 2008 04:07 PM

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

All times are GMT -4. The time now is 07:46 PM.

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