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.

Bug 216157 - Designer Size of Frame not editable
Summary: Designer Size of Frame not editable
Status: RESOLVED INCOMPLETE
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-30 22:42 UTC by PeterSorg
Modified: 2012-08-28 13:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (33 bytes, text/plain)
2012-07-30 22:43 UTC, PeterSorg
Details
NB-Testproject (13.49 KB, application/7z)
2012-07-31 17:39 UTC, PeterSorg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PeterSorg 2012-07-30 22:42:56 UTC
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
Comment 1 PeterSorg 2012-07-30 22:43:01 UTC
Created attachment 122549 [details]
IDE log
Comment 2 PeterSorg 2012-07-30 22:45:09 UTC
Comment on attachment 122549 [details]
IDE log

..
Comment 3 PeterSorg 2012-07-31 17:39:13 UTC
Created attachment 122597 [details]
NB-Testproject

Import the attached Project to Netbeans to test
Comment 4 Tomas Pavek 2012-08-20 17:30:24 UTC
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.
Comment 5 PeterSorg 2012-08-28 09:18:32 UTC
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?
Comment 6 PeterSorg 2012-08-28 09:22:59 UTC
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)
Comment 7 Tomas Pavek 2012-08-28 13:54:55 UTC
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?