Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting maximum width using Matisse GUI builder
    primarykey
    data
    text
    <p>I'd like to create a GUI where some of the textfields are resizable horizontaly but maximum width is also specified. For instance the preferred width is 100 pixels, it can be bigger if the window is resized, but the maximum allowed width is 200 pixels. <a href="http://java.sun.com/javase/6/docs/api/javax/swing/GroupLayout.html" rel="nofollow noreferrer">GroupLayout</a> supports this, we can specify the max size in the <a href="http://java.sun.com/javase/6/docs/api/javax/swing/GroupLayout.SequentialGroup.html#addComponent%28boolean,%20java.awt.Component,%20int,%20int,%20int%29" rel="nofollow noreferrer">addComponent</a> method (alongside with minimum and preferred).</p> <p>I'm using Netbeans and <a href="http://netbeans.org/features/java/swing.html" rel="nofollow noreferrer">Swing GUI Builder (Matisse)</a>. I can set the textfield to be resizable, I can set the preferred size, but I've found no place to set the maximum size (and for the minimum). Here is the layout section of the property sheet:</p> <p><a href="http://img690.imageshack.us/img690/3523/netbeanstfproplayout.png" rel="nofollow noreferrer">alt text http://img690.imageshack.us/img690/3523/netbeanstfproplayout.png</a></p> <p>Since maximum size cannot be set, Netbeans use <code>Short.MAX_VALUE</code> instead, so if a textfield is resizable it has no upper limit. I've also tried to set the <code>maximumSize</code> property of the component but it has no effect and will be ignored.</p> <p>If I manually edit the <code>.form</code> file I can change the <code>max="32767"</code> part to <code>max="200"</code> and Netbeans generate correct code. Is there a way to set it without manually editing the <code>.form</code> file?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload