Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   No Box.createRigidArea .. In NetBeans Toolbox (http://www.velocityreviews.com/forums/t959548-no-box-createrigidarea-in-netbeans-toolbox.html)

clusardi2k@aol.com 04-08-2013 09:19 PM

No Box.createRigidArea .. In NetBeans Toolbox
 
I don't think that "Box" is a control in the NetBeans toolbox.

Consequently, I'd like to simulate the following lines of code.

Question: How do I do it?


JPanel MyPanel;

MyPanel.add(Box.createRigidArea(new Dimensions 20,25));
MyPanel.add. ...


MyPanel.add(Box.createHorizontalGlue());


Thanks,

Lew 04-08-2013 10:07 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
clusa...@aol.com wrote:
> I don't think that "Box" is a control in the NetBeans toolbox.


IIRC you can add components to the toolbox.

> Consequently, I'd like to simulate the following lines of code.
>
> Question: How do I do it?


Type it in directly?

> JPanel MyPanel;


Variable names are supposed to begin with a lower-case letter.

> MyPanel.add(Box.createRigidArea(new Dimensions 20,25));


This doesn't throw a 'NullPointerException' for you?

It should.

> MyPanel.add. ...
>
> MyPanel.add(Box.createHorizontalGlue());


Why would you add that to the panel?

--
Lew

markspace 04-08-2013 10:15 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
On 4/8/2013 2:19 PM, clusardi2k@aol.com wrote:

> Question: How do I do it?


> JPanel MyPanel;
>
> MyPanel.add(Box.createRigidArea(new Dimensions 20,25));


You have to select BoxLayout on your panel form first. Then the rigid
separators and glue appear on the Pallet. Scroll down to Swing Filler
to find them (it's a ways).




markspace 04-08-2013 10:35 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
On 4/8/2013 3:15 PM, markspace wrote:
> On 4/8/2013 2:19 PM, clusardi2k@aol.com wrote:
>
>> Question: How do I do it?

>
>> JPanel MyPanel;
>>
>> MyPanel.add(Box.createRigidArea(new Dimensions 20,25));

>
> You have to select BoxLayout on your panel form first. Then the rigid
> separators and glue appear on the Pallet.


"Palette." Argh.




clusardi2k@aol.com 04-10-2013 01:23 AM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
On Monday, April 8, 2013 6:15:15 PM UTC-4, markspace wrote:
> On 4/8/2013 2:19 PM, clusa...@aol.com wrote: > Question: How do I do it? > JPanel MyPanel; > > MyPanel.add(Box.createRigidArea(new Dimensions 20,25)); You have to select BoxLayout on your panel form first. Then the rigid separators and glue appear on the Pallet. Scroll down to Swing Filler to findthem (it's a ways).


I tried following these steps exactly, but I couldn't find "Swing Filler". The closest thing that I found was "Separator".

Why am I not seeing "Swing Filler".

Thanks,

markspace 04-10-2013 03:25 AM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
On 4/9/2013 6:23 PM, clusardi2k@aol.com wrote:
>
> I tried following these steps exactly, but I couldn't find "Swing
> Filler". The closest thing that I found was "Separator".
>
> Why am I not seeing "Swing Filler".



Beats me. I'm using NetBeans 7.2, if that helps. I see two separators
in the Palette, one is under Swing Controls and the other is under Swing
Menus. Keeps scrolling, it's further down than either.


John B. Matthews 04-10-2013 02:55 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
In article <kk2lud$ev1$1@dont-email.me>,
markspace <markspace@nospam.nospam> wrote:

> On 4/9/2013 6:23 PM, clusardi2k@aol.com wrote:
> >
> > I tried following these steps exactly, but I couldn't find
> > "Swing Filler". The closest thing that I found was "Separator".
> >
> > Why am I not seeing "Swing Filler".

>
>
> Beats me. I'm using NetBeans 7.2, if that helps. I see two
> separators in the Palette, one is under Swing Controls and the
> other is under Swing Menus. Keeps scrolling, it's further down
> than either.


Same in 7.3. Swing Fillers may be easier to spot if the other tree
nodes are closed.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

clusardi2k@aol.com 04-10-2013 06:32 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
On Wednesday, April 10, 2013 10:55:36 AM UTC-4, John B. Matthews wrote:
> In article <kk2lud$ev1$1@dont-email.me>, markspace <markspace@nospam.nospam> wrote: > On 4/9/2013 6:23 PM, clusa...@aol.com wrote: > > > > I tried following these steps exactly, but I couldn't find > > "Swing Filler". The closest thing that I found was "Separator". > > > > Why am I not seeing "Swing Filler". > > > Beats me. I'm using NetBeans 7.2, if that helps. I see two > separators in the Palette, one is under Swing Controls and the > other is under Swing Menus. Keeps scrolling, it's further down > than either. Same in 7.3. Swing Fillers may be easier to spot if the other tree nodes are closed. -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>


I have an older version of NetBeans.

Thanks,


clusardi2k@aol.com 04-10-2013 07:17 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
Are "Swing Fillers" 3rd party controls? Do get them do I have to download them from the Internet.

Thanks,


clusardi2k@aol.com 04-10-2013 07:37 PM

Re: No Box.createRigidArea .. In NetBeans Toolbox
 
Are "Swing Fillers" 3rd party controls? To get them, do I have to download them from the Internet.

Thanks,




All times are GMT. The time now is 04:31 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.