Size of GridLayout

How do I set the size of one "cell" in a GridLayout?


0
Jo
4/10/2004 3:27:50 PM
comp.lang.java.gui 8306 articles. 15 followers. Post Follow

2 Replies
398 Views

Similar Articles

[PageSpeed] 29
"Jo" wrote...

> How do I set the size of one "cell" in a GridLayout?

You don't...

To "set the size on a singular cell" is rather another paradigm on how
layouts are made, than the underlying premises on how the LayoutManagers
work.

The use of exact pixel sizes was more or less abandoned for the use of
relative sizes. This is to some degree based on the premise that you would
probably prefer the look of the layout to adapt more to the actual
platform...

To make a long story short:

Say for example that you define a panel with a GridLayout(3, 2).

If the size of the panel is height 60 and width 30, then *each* cell will be
height 20 an width 15.

If you change the size of the panel to height 30 and width 60, the size of
*each* cell will be height 10 and width 30.

As you see the sizes of the individual cells are set "relatively" to the
size of the container.

// Bjorn A


P.S.

Questions of this kind should only be posted to comp.lang.java.gui.
No sense in posting it to comp.lang.java.programmer.


0
Bjorn
4/10/2004 4:10:14 PM
"Jo" <mmmmm@spamtrap.com> wrote in message
news:c593nj$2qfp46$1@ID-83837.news.uni-berlin.de...
> How do I set the size of one "cell" in a GridLayout?
>
GridLayout is simply a convenience mechanism to avoid you having to
explicitly specify the position of every component on a panel.   The layout
takes the size information for each of the components and calculates where
they should be within the enclosing component.  You set the size information
of the individual components.  This can be done even after they are added to
the enclosing component as long as it is before you pack the frame the
component is displayed in.


0
Jim
4/10/2004 9:12:07 PM
Reply:
Similar Artilces:

ps2pdf image size
Hi, I used ImageMagick's convert to convert pgm's to ps. This worked well. The pgm's were scanned at 200dpi and when the ps file is viewed the images fill the whole page. I then run ps2pdf as so: ps2pdf out.ps out.pdf The resulting pdf file has the same page size as the ps file, but the images within are only about two thirds the size. I've read man pages and documentation. I've tried a dozen switchs/options but can't get it right. Help! Regards, Doug On Fri, 19 May 2006, Doug_M wrote: > I used ImageMagick's convert to convert pgm's to ps. This worked...

Change current font-size module
Hi, This is my first attempt at writing a useful lisp module. I'd be grateful for any comments on it, as I've never programmed in Lisp before. Needed enhancements: 1) Determine if the current terminal supports font sizes, (terminal frames don't) 2) Only change the face for all frames on the current device. 3) Figure out why come faces aren't inheriting their sizes from 'default TIA, Colin S. Miller (defvar csm-base-font-sizes [8 10 12 14 16 20 24 26 27 28]) ; a list of fonts sizes that look 'nice' with the default ; font (defun cs...

matrix sizes in the fmincon function
if the matrix that I need to optimize is 60x3 and I want each row to have the first parameter positive i.e the linear inequality constraints A=[-1 0 0] and B=0 for each row.what should be the size of A and B in this case? I am receiving an error that A should have 180 columns . Any help is appreciated "joseph Frank" <josephfrank1969@hotmail.com> wrote in message news:i52mss$adi$1@fred.mathworks.com... > if the matrix that I need to optimize is 60x3 > and I want each row to have the first parameter positive i.e the linear > inequality constraints A=[-1 0 0] and...

How to retrieve the size of a vector
Hello everybody, I have little verilog problem, I have two values (for instance 15 and 25) and I would like to define another parameter which would be equal to the length of the binary vector (ADDX1+ADDX2). parameter ADDX1 = 15; parameter ADDX2 = 25; parameter ADD_LENGTH = ????; Does somebody know if it is possible to do so in verilog ? Cordially Ben Ben wrote: > Hello everybody, > > I have little verilog problem, > I have two values (for instance 15 and 25) and I would like to define > another parameter which would be equal to the length of the binary...

photo size
I have been trying print 4 by 6 inch photos from my digital camera. The closest I can come is 4 by 5.33 inches. If I try to stretch the length dimension to get 6 inches, the resulting photo is distorted. My thought is this is a digital camera issue. Perhaps there is something else that I am not aware of. Anyone else had this problem? Thanks, Jim On Fri, 11 Jul 2003 15:54:20 GMT, "JimT" <jimanderikatclothes@comcast.net> wrote: >I have been trying print 4 by 6 inch photos from my digital camera. The >closest I can come is 4 by 5.33 inches. If I try to stretch th...

Manual sizing fences vs. kpfonts
Hi In several projects we have been using the Kp-fonts font which was well received by the publisher. When editing the various projects in kpfonts, I've noticed that the size jump between ( and \big( is a lot larger than is the case for say the CM font, see the example below (compare with and without kpfonts). In CM there is no problem in writing $\big(x+(a+2)^2\big)$, but with kpfonts the outer fences become way too large. It is quite frustrating having to spend time fixing these. So I'd like to know if anyone had any idea as to how one should 'fix' this large jump by...

Will "renames" increase program size?
Hi, Just out of curiosity, will "renames" increase program size? e,g, package A renames Ada.Text_IO; P : Person_Rec renames Personnel_Record; I presume Ada compiler will replace the names just like #define in C, so no increase in program size. But I just want to be sure. Thanks. -- Adrian Hoe http://adrianhoe.com/adrianhoe "Adrian Hoe" <abyhoe@gmail.com> wrote in message news:46294109-f07d-49c0-8e81-65a369a05ced@z15g2000prn.googlegroups.com... > Hi, > > Just out of curiosity, will "renames" increase program size? > > e,g, > > pac...

Figures size and GraphicsArray
Hi, I generated several 2D figures (curves), fig1, fig2, fig3, fig4, and then used Show[GraphicsArray[{{fig1, fig2},{fig3, fig4}}]] to plot the figures together. However, the above command keeps the total size of the figure, i.e., including the numbers of the y coordinates, to be the same, rather than the size of the bounded box the same, even each figure is plotted with the same x range. Since the numbers of the y coordinates are different (for example, 0.1 -- 0.9 for fig1, but 0.001 -- 0.009 for fig2 ... etc), the array does not look too pleasant. Is there any way to overco...

Setting new page size
I am trying to create a new page size without success. I tried this - oPd := PrintingDevice{} oPd:PaperSize := DMPAPER_USER oPd:PaperHeight := 930 //0.10 mm oPd:PaperWidth := 2150 Can anyone point me in the right direction? Thanks Trevor, How do you know it doesn't work? What are the problems you are facing? How does the failure of the setting manifest itself? Id your printer driver capable of accepting these settings? Geoff "Trevor Young" <tlyoung@cwjamaica.com> wrote in message news:1144194456.219992.111560@z34g2000cwc.googlegroups.com: &g...

file size algorithm for 0 compression gzip
I was wondering if anyone had an algorithm to determine the file size of a gzipped file with 0 compression. Undoubtebly it will be affected by the names and paths of the files in the zip. Thx~ Paul "PJ" <pjwal@hotmail.com> wrote in message news:<aeednTXmtsx-_MHcRVn-qQ@speakeasy.net>... > I was wondering if anyone had an algorithm to determine the file size of a > gzipped file with 0 compression. Undoubtebly it will be affected by the > names and paths of the files in the zip. There is no -0 option for gzip. If the data is incompressible by gzip, the size ...

full size (in bytes) of an mxArray
I am a new Mex programmer. Is there an easy way to determine the full size (in bytes) of an mxArray (which includes EVERYTHING Matlab adds such as header bytes, field name bytes, data bytes, etc)? The reason I ask is that I want a Mex C routine to send an mxArray through a Unix fifo to another copy of Matlab. To do this requires a pointer to the mxArray and the size in bytes of the mxArray. My other option is to work my way through the mxArray as in the explore.c example provided by Mathworks. However, this looks painful and slow. Thanks. "Erik " <erik.cook@mcgill.ca&...

Guidelines Needed For Sizing Switch Trunks
Is there a guideline published that considers the total number of 100 MB ethernet ports on a switch and then recommends an appropriate size for the gigabit ethernet channel (trunk) connecting the switch to the rest of the network ? Not sure that a chart actually exists, but the answer is probably determined by several factors. What is the function of the trunk? Is it an uplink from an access layer switch or a connection between two core devices? Does the access layer switch have Servers connected to it, or general use desktop computers? How is your network used (lots of voice/video, large fi...

Code size as a function of source size
Hi, I would like to pose a very simple question, for which nevertheless I could not find an answer through google: Of what general type is the dependence of the size of compiled code to the size of the respective source code? Or to put it "mathematically", what function f(s) approximates the points (s, o(s)) best, where s is the size of the source code (say in bytes and normalized by removing commentaries and not using uncommonly long identifiers or amounts of white space) and o(s) is the size of the corresponding object code (without any libraries linked in). It seems natu...

2GB size limit on Access2003/XP ?
Is there a 2GB size limit on Access2003/XP ? If so, is there an easy way to span across more than one MDB file? Yes, that limit still applies. If you are using fields of type OLE Object, they bloat the database badly. You could solve the problem by using Hyperlink fields instead (i.e. so the fields link to external data, instead of embedding BLOBs inside the database.) Getting rid of any other graphical data form the database will also help, e.g. if you used the Picture property on your forms. Don't forget to compact the database after changes: Tools | Database Utilities | Co...

size specification in size constant
Hi Consider following size constant -- "temp = 10'd28". Now I want to replace 10 with parameter TEN = 10; i.e temp = TEN'd28. But compiler is giving error for above expression. It is allowing me to use `define TEN 10 and `TEN'd28. I donot know my complain is valid or not but it is stupid thing. I donot want to use `define construct instead my pref is parameter construct. Is there any way I can use parameter and write temp = {parameter'd28} Regards "sandeep" <sandeepkumar.sah@gmail.com> wrote in message news:b189510a-2767-431a-bb99-019f...

Safari Menu Bar print size
Currently the print size I use on my 21 inch screen is 16/18 points. The print size used on "Safari" menue bar is either 8 or 9. This being the case, it is necessary for me to use my reading glasses, plus a mag. glass to read the list of bookmarks on the menu bar. I don,t like using the zoom facility as it leaves me with an out of focus eye. Surely, there must be some way of permeantly increasing the print size used in the menue bar. Stan Robinson. ...

Tezro size and door
Saw a desktop Tezro today. Wow--is it ever big! Seriously chunky stuff. The colour is wonderful, and the cube logo just begs you to come over and look at it. Anyway, the door appears to have some damping in the hinges that prevents it from simply flopping down. While this isn't exactly hard core tech info, it's also the sort of stuff you can't really learn online. ;-) -- David Evans (NeXTMail/MIME OK) dfevans@bbcr.uwaterloo.ca Ph.D. Candidate, Computer/Synth Junkie http://bbcr.uwaterloo.ca/~dfevans/ University of Waterloo &quo...

Re: Size of Dataset
Dear SAS-L-ers, Ash007 posted the following: > > Is it possible to retrieve the size of a dataset with a sas program. > Ash, you didn't state what type of "dataset" for which you are looking to retrieve the size thereof. (How's that for murdering the King's English)?!?!?!? Assuming that it is a SAS data set that you have already LIBNAME-d, you could simply use the FILESIZE variable in the SASHELP.VTABL view. Neat, simple, and no messy OS commands to soil your pristine SAS program. If your "dataset" is not a SAS data set, then you may en...

How can I convert size requirements from Altera devices to Xilinx devices?
I have two designs for an Altera chip that use approximately 6,000 and 24,000 logic elements. I am looking at moving to Xilinx tools, but am not sure how these numbers translate across manufacturers. I have seen Xilinx FPGA with gate counts cited, but I am not sure what those number mean. Can anyone provide some guidance in this? On 2/1/2010 2:59 PM, Sam wrote: > I have two designs for an Altera chip that use approximately 6,000 and > 24,000 logic elements. I am looking at moving to Xilinx tools, but am > not sure how these numbers translate across manufacturers. I have se...

RE: [ace-users] Limit for MIOP request size and UDP packet size #2 #2
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C37222.EF341BD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks for your reply, I looked at the MIOP code and saw indeed a definition of = MIOP_MAX_DGRAM_SIZE that equals to ACE_MAX_DGRAM_SIZE in TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp. I also saw that ACE_MAX_DGRAM_SIZE is directly used in the same source = file in multiple locations. Is it normal ? So I pre...

font: size, color wish list
Just putting this out - I wish if I highlighted text, I could be shown what size and color it is (by way of highlighting the item in the drop down list). Most text size/color is not reproducible (so far) for me.... sf wrote: >Just putting this out - > >I wish if I highlighted text, I could be shown what size and color it >is (by way of highlighting the item in the drop down list). Most text >size/color is not reproducible (so far) for me.... > > Assuming you are speaking about mail you receive, try hitting reply, then hilite and look at the toolbar...

SAS Market Size
Dear All =20 Could anyone send me info/pointers on the whole picture of SAS field in = terms of various business areas where SAS plays an important role (for = eg., Healthcare, Financial, Environmental etc), how the SAS field has = grown in the past and the future forecast of SAS growth as well as some = of the popular successful model and small firms involved in this = business etc. =20 I would appreciate if you could share with me some of these information. = If there are more interests, I will be happy to summarise to the list.=20 =20 Best regards, - Parthi ...

N1919 initializer list size and constexpr
It is not clear from N1919 if the size of an initializer list is a constexpr >From 4.5: """ Clearly, there is enough information to deduce that s.size() is 3. Equally clearly, making s.size() a constant expression requires a special rule. The proposal for generalizing constant expressions (N1920=05-0180) suggests that this can be made to work. We are not sure whether this is really important or just something people thought interesting. We need a solid use case. """ Has there been any update on this? I would personally find static sizing ve...

File size vs. Directory size problem
Hi all, Got a bit of a problem I dont know how to go about. Basically my script takes 2 different directories, puts each file/sub directory into an array for each, sorts the array, compares them, and then spits out what is missing from each directory. Im really happy with this as it is my first real ruby script and it works a charm. Now I was wanting to add to it. Basically I want to take the size of each file and see if they are greater than 0, and if it is 0 then output the file. My problem is that a directory is returned as being of size 0. Obviously I dont care about the directory size i...

Overlaying two different sized images
I am having a problem with overlaying two sets of data. Essentially, I have two contour plots - one is a contour plot (with contourf) that displays the data I want from a 125x125 matrix. However, certain sections of this plot need to be disregarded, so ideally I'd like to black them out. The data on which sections to black out are stored in another matrix, also 125x125. My first attempt was to simply over plot the data (I've reduced the code to the bare minimum): [~, hC] = contourf(dimStack,contourLevels); colormap(cm1); caxis([contour_range(1) contour_range(2)]); hold on [~, s...