• Post Reply Bookmark Topic Watch Topic
  • New Topic

Where can i download com.borland.jbcl.layout.*  RSS feed

 
amedeo modigliani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Where can i download a package com.borland.jbcl.layout?
or can someone tell me which class in javax.swing can be used for XYLayout

thanks
 
Thorsten Klonk
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I'm wrong, but I thing this package is only shipped with Borlands JBuilder.

You can use Nulllayout by calling:

and arrange the things on your own.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that "LayoutManager" isn't available for free.

Perhaps you should think about using a *true* layout manager. The XYLayout defeats the whole purpose of LayoutManagers in Java.
 
Brian Mozhdehi
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would recommend using GridBagLayout. Its complicated but powerful. Search for an example on its use online, then for easier use, copy paste some code and reuse that......then really all you should need to manipulate are the two parameters that define your X and Y coordinates for each component, which are the first two parameters in GridBagConstraints, and the insets, which help define spacing. You can use the sizing methods of the objects themselves to define sizing.

I would not use a null layout manager. This only works on screens that only are displayed on one platform AND are never minimized, maximized or moved (as when these events occur, the explict positioning is lost and the system will revert to a flow layout)
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the JBuilder 2005 redistribution documentation:

For the purpose of the license(s) included with this product, the redistributables for the JavaBeans Component Library (JBCL) is defined as the jbcl.jar and jbcl-awt.jar files in the /jbuilder2005/redist directory, and/or the individual files in those archives.

To the extent that you are allowed to redistribute redistributables under the terms of your license, you may redistribute these classes in any of the following formats subject to the restrictions in the license agreement:



and from the JBuilder online help:

XYLayout is a JBuilder custom layout manager. XYLayout puts components in a container at specific x,y coordinates relative to the upper left corner of the container. Regardless of the type of display, the container will always retain the relative x,y positions of components. However, when you resize a container with an XYLayout, the components do not reposition or resize.

XYLayout is very convenient for prototyping design work. When you design more complicated user interfaces with multiple, nested panels, XYLayout can be used for the initial layout of the panels and components, after which you can choose from one of the standard layouts for the final design.
Note: To ensure your layout will be nicely laid out on other displays, don't leave any containers in XYLayout in your final design


So it's there almost purely for prototyping and internal use by the IDE.
Check if the application really uses it. If not, just remove the import (a common mistake, leaving imports in place).
If it is, and you don't have a JBuilder version that allows redistribution of the JBCL jars or you don't want to leave it in, redesign the user interface to use other layout managers (which is what Borland themselves advise you to do).
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brian Mozhdehi:
I would recommend using GridBagLayout.


Ouch - I wouldn't. I'd say it's overcomplicated for what it does. Most things can better be done with a combination of simpler LayoutManagers, including open source ones like FormLayout etc.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, but many people still think you have to choose one layout manager and use that to create an entire screen, they've never realised you can mix 'n match as desired and required.
 
Brian Mozhdehi
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
agreed you can mix and match. I like GridBagLayout though, its powerful. I find some of the other ones to be a pain to get to exactly do what you want. I'll look at FormLayout though and maybe learn something. Thanks for the tip.
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree about layout managers. I have just posted the same sort of thing on the Swing forum.
The null layout is not as good as it appears at first sight because it fixes the locations of the objects; changing the size or proportions of the JFrame may cause them to disappear or may show empty space on part of your window.
Try GridLayout before using GridBag, because it is easier to understand. Look at Cay Horstmann's website, where there is a class called "GBC" which makes handling GridBag quicker and easier.
CR
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!