This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If a (internal)Frame contains textarea, the "Designer Size" of the Frame can't be configured. If the textarea contains text, the frame will be rendered too large. No word- or linewrap will be done in textarea. Example-project will follow. Product Version = NetBeans IDE 7.2 (Build 201207171143) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.6.0_24 Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02
Created attachment 122549 [details] IDE log
Comment on attachment 122549 [details] IDE log ..
Created attachment 122597 [details] NB-Testproject Import the attached Project to Netbeans to test
I've looked at the attached form and the main problem with it is that the JTextArea component has a fixed size set 32757 pixels, which is really enormous. Not sure how you got it to that state, but it makes no sense. It might be a bug of its own, but we would need the steps from you to know how to get to such state. In general, if there is a component with a *fixed* size the designer size can't go under this size. So if you set a component to fixed size 32757 pixels, the designer area must be large to contain it. You can easily resize the component by mouse to any size you want. In this case of such enormous size it's better to go to the Layout properties of the text area component and set directly the Horizontal Size property to some reasonable number. Once it gets smaller it will also wrap the text (it needs some explicit width set to do wrapping). And then you can also shrink the designer, e.g. move the mouse at the bottom edge of the resizable area and when the mouse cursor changes to resizable, double click it and enter some size. There's another problem with JTextArea which is not directly visible here, but is related. Even if the JTextArea is made resizable (horizontally), so it could adjust to whole container size, it is still not possible to shrink the designer size with it by mouse (can only grow). It's caused by the JTextArea's way of computing its preferred size. This can be easily workarounded by placing it inside a scroll pave, which is done by default. Not sure why you made your JTextArea exist without a scroll pane. So I don't see a real problem here: JTextArea added to a form (kept in scroll pane), made resizable (resized over the form) and having lineWrap property set to true works just well for text wrapping. And also entire designer can be resized with it. If still having problems please describe your steps exactly from the beginning.
Some points: 1.) If you want to use JTextareas without encapsulating JScrollpanes to hold floating texts (with links etc.) in a "resizable" format, using JScrollpane is no option. The GUIDesigner had no problem with this - up to version 7.2 (or 7.1?) After i migrated my project to 7.2, the GUI-Designer now is completly unusable, because of this "new behavior". (Argh!) Maybe, the 32757-pixel width was setted automaticly during migration? 2.) To create the example, i added the JTextarea simply via drag&drop in GUI Designer. So the configured fixed 32757-pixel width comes from the IDE ... 3.) The view in GUI Designer and "real" Application diverts at this point. WYSIWYG? P.S. If i cant use Not-JScrollpane-embedded-JTextareas anymore to get automaticaly resized Areas of formatted Text, how can i realize this alternativly?
So check my points above! - GUID is unusable, if you migrate from former versions - Wrong Behavior of Drag&Drop a JTextArea in GUID (fixed width of 32757px) - WYSIWYG is broken at this point (Reopened)
If you believe this happened when opening a GUI form from previous version in 7.2 then please attach a sample form that demonstrates it. The one you attached looks same in 7.0 and 7.1. I've also tried to create it from scratch, in 7.0, 7.1 and 7.2 and never got the 32757 pixels width. I created a GUI form, dragged a text area onto it, dragged it out of the scroll pane, deleted the scroll pane, set the text and the properties, all working as expected. There must be some special steps that lead to what you got. So again: 1) If this happened when opening in 7.2 then we need the original form that was fine in previous version but got screwed by opening in 7.2. 2) If the situation can be reproduce by creating a GUI form from scratch, we need to know the exact steps. Can you repeat them?