Label bounds bigger than they really are

I have a question regarding the calculation of the bounds of labels and how they are used to take up space in a parent.
In my example, i have an application where the top element is a border pane. In the left part of the borderpane i have a VBox with a specified maxWidth (in this case, 250). The last element of the VBox is another VBox to display a label (a headline) and a GridPane. In this GridPane i have several other labels. Consider this picture:
pic1
This is how it should look like (i enabled gridLinesVisible for sake of demonstration).
When i use a Text instead of a label in the right column, i get this:
pic2
Since the Text in the second row exceeds the maxWidth of the top VBox but cannot be made smaller, the VBox grows in width. Everything ok here.
But when i use a label, i expect the label to respect the maxWidth of the top VBox. Altough it seems that it does this, see the result:
pic3
The label cuts the text at the correct place and the grid column is not larger than the needed space, but still the VBox width grew.
Is this a bug or am i doing something wrong? When i set the ColumnConstraints of the GridPane to a value, i get the result of the first picture. But this workaround isn't practicable since it's a hazzle to find out the right amount of pixels and what i really want is the label to fill the remaining space it has available from the top VBox.

jsmith wrote:
Should i write a minimal example for reproducing this issueYes.Main.java:
package labelboundsissue;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.shape.Line;
import javafx.stage.Stage;
import java.net.URL;
public class Main extends Application {
  public static void main(String[] args) {
    launch(args);
  @Override
  public void start(Stage primaryStage) throws Exception {
    BorderPane pane = new BorderPane();
    StackPane center = new StackPane();
    center.setAlignment(Pos.CENTER_LEFT);
    Label someLabel = new Label("  Label Bounds Issue Test");
    Line line = new Line(0,0,0,500);
    center.getChildren().addAll(line, someLabel);
    pane.setCenter(center);
    FXMLLoader loader = new FXMLLoader();
    URL resource = getClass().getResource("left.fxml");
    loader.setLocation(resource);
    Parent  left = (Parent) loader.load();
    pane.setLeft(left);
    Scene scene = new Scene(pane, 800, 500);
    primaryStage.setScene(scene);
    primaryStage.show();
}left.fxml:
<?xml version="1.0" encoding="utf-8"?>
<?import java.lang.*?>
<?import java.net.URL?>
<?import javafx.scene.shape.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.image.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.text.*?>
<?import javafx.scene.web.*?>
<?import javafx.scene.*?>
<VBox maxWidth="200">
  <GridPane gridLinesVisible="true" hgap="5">
    <columnConstraints>
      <ColumnConstraints hgrow="NEVER"/>
      <ColumnConstraints hgrow="NEVER"/> <!-- comment this -->
      <!--<ColumnConstraints hgrow="NEVER" maxWidth="155"/>--> <!-- uncomment this -->
    </columnConstraints>
    <Text GridPane.columnIndex="0" GridPane.rowIndex="0" text="Name:"/>
    <Label GridPane.columnIndex="1" GridPane.rowIndex="0" text="Karl Theodor Maria Nikolaus Johann Jacob Philipp Franz Joseph Sylvester Freiherr von und zu Guttenberg" />
  </GridPane>
</VBox>When starting the application you can see vast amount of space between the end of the label and the left border of the border pane, altough it should be limited by the VBox' maxWidth.
Adjusting the maxWidth of the Column solves it.

Similar Messages

  • Text appearance in adobe acrobat (pro) files displays inconsistently unless you zoom in. Mainly 'i's and 'l's look bigger than they should.

    Text appearance in adobe acrobat (pro) files displays inconsistently unless you zoom in. Mainly 'i's and 'l's look bigger than they should.
    The pdfs print fine though.

    Try doing a spotlight search for all files that start with AdobeFnt. They will be named AdobefntXX.lst, with the XX being some number. They will be scattered across the drive... After making sure that all Adobe applications are closed, trash all the adobefntxx.lst files, those with the 3 letter extension .lst.
    Then, restart the system, and open the files in Acrobat again.
    Otherwise, what happens in Safe boot? (Remember, Safe boot loads only a default set of fonts.) If they display fine there, the problem most likely is a font issue, one of the fonts that Adobe installed.
    Check Adobe's web support page for troubleshooting Fonts.
    - or -
    Contact Adobe about the whole issue, it is after all, Adobe Acrobat... Adobe's contact number is 800 833 6687.

  • My officejet 6500 prints photos much smaller than they actually are in photoshop. What is the cause?

    Photos are seven by four inches and are either 150 or 300 dpi in photoshop. When I try to print them out they come out of the printer at about one by one and a half inches. Using the latest firmware and software for the e709a for xp on xp professional machine running at about 2 gigahertz with 4 gig of ram. When I try to print the same files from MS Paint it prints various quadrants of the the photo on multiple pages.Similar problem occurs with MS Image Viewer application. Any ideas how to fix this?
    I am currently uninstalling and reinstalling all hp software. I will clean out temp files and registry with ccleaner then reboot before reinstalling. Just thought I'd ask to see if anyone has a solution for this problem.

    Hi there david623,
    If that did not work for you lets try downloading and running the print and scan doctor located here:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03275041&cc=us&dlc=en&lc=en
    It can fix a lot on its own and if not give a better idea of what is going on.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • It says apps are taking up more space on my phone than they actually are. I can no longer download anything to my iPhone. PLEASE PLEASE HELP!

    please please please help! It says in my iPhone Free Space area on iTunes that the apps on my phone are taking up 9.20 GB when I only have one page of apps (all fairly small ones, too!). I can no longer download anything to my phone because of this, and I need help to bring my "app space" down from the incorrect number.

    Hi Lisa,
    Did you ever manage to resolve this issue? I"m having exactly the same issue. I have about 350MBs of App stuff on my phone but it says it's using 10gigs!!! Have no idea how to resolve this...NE ideas?

  • I am being blocked from all websites, almost everyone that I have always used before due to security certificates "being expired" when they really are not!

    all websites, that i have used many, many times are being blocked...I cannot get into almost all websites, all of which I know are safe...ie llbean, directv...

    One possible reason for ''all'' SSL checks to fail is the Windows clock being off from true time. Can you check on that?

  • Why is Photoshop showing images cooler than they actually are?

    Hi everyone,
    I work with Lightroom and Photoshop together, but when I open a file from Lightroom to Photoshop, the images look a touch cooler in Photoshop. At first I thought my colour settings must be off but they're the same in both Apps.
    Even weirder, when I take a screenshot with Monosnap and look at the image in Finder, the colour looks normal... So it's as if Photoshop were showing me the image cooler but it's not changed at all.
    Any ideas?

    If there is a difference between Photoshop and Lightroom the most likely cause is a bad/broken/wrong monitor profile. This can affect different applications differently. To test this, set sRGB IEC61966-2.1 as monitor profile on system level, and relaunch the applications so that they can load the new profile:
    There is normally no particular need to have color settings synchronized between PS and Lr. Color management works the same way in both of them. The source color space is remapped/converted into the monitor color space, and the end result should be identical whatever that source is.
    Some other applications, however, aren't color managed at all, and just ignore the monitor profile completely.
    To get a correct screenshot from a color managed application, assign the monitor profile first, then convert to sRGB.

  • Why Index size is bigger than table size?

    Dear All,
    I found in my database my tables sizes is coming around 30TB (All Tables in Database). and my index size for the same is 60TB. This is data ware housing environment.
    How the index size and table size are differing?
    Why they are differing? why index size is bigger than table size?
    How to manage the size?
    Please give me clear explanation and required information on the above.
    Regards
    Suresh

    There are many reasons why the total space allocated indexes could be larger than the total space allocated to tables. Sometimes it's a mark of good design, sometimes it indicates a problem. In your position your first move is to spend as little time as possible in deciding whether your high-level summary is indicative of a problem, so you need to look at a little more detail.
    As someone else pointed out - are you looking at the sizes because you are running out of space, or because you have a perceived performance problem. If not, then your question is one of curiosity.
    If it's about performance then you should be looking for code (either through statspack/AWR or sql_trace) that is performing badly and use the analysis of that code to help you identify suspect indexes.
    If it's about space, then you need to do some simple investigations aimed at finding a few indexes that can be "shrunk" or dropped. Pointers for this are:
    select
            table_owner, table_name, count(*)
    from
            dba_indexes
    group by
            table_owner, table_name
    having
            count(*) > 2   -- adjust to keep the output short
    order by
            count(*) desc;This tells you which tables have the most indexes - check the sizes of the tables and indexes and then check the index definitions for the larger tables with lots of indexes.
    Second quick check - join dba_tables to dba_indexes by table_name, and report the table blocks and index leaf blocks in desending order of leaf block count. Look for indexes which are very big, and also bigger than their underlying tables. There are special cases (and bugs) that can cause indexes to be much bigger than they need to be ... this report may identify a couple of anomalies that could benefit from an emergency fix followed (possibly) by a strategic fix.
    Regards
    Jonathan Lewis

  • Adobe hack bigger than first admitted

    So it seems that adobe lost 38 million user details, 10 times more than they first admitted to.
    Thats the bad news.
    The good news of course is the hackers got the code to photoshop. So hopefully it will find its way into a variety of other developers and into the general public ridding the world of adobes corporate greed with this faulty creative cloud scam they got running.

    Here is one article about it:
    http://www.nbcnews.com/technology/adobe-hacker-attack-much-bigger-previously-disclosed-8C1 1493155
    My biggest concern is trusting Adobe with my credit card any more.  My credit card company is sending me a new card and automatically cancelled my current one (Adobe contacted them).  Now I have the pain of changing the card at a variety of places.  How do I know that Adobe has figured out how they got hacked?  Has the hole been plugged or will we be going through this all over again in a few months?  The fact that they said one thing a few weeks ago and now this is "bigger" than they thought... makes me wonder if they really understand what happened and can keep my information safe in the future.  I am very skeptical.  I have been a big supporter of Adobe over the years and actually feel that CC isn't that bad of a deal (considering I use a Mac and a PC, the pricing is much better since I don't have to own two different licenses).  However, this is really making me think hard about giving Adobe my CC any more in the future.

  • HT201361 Whenever I take a screenshot on my Macbook Pro, it always comes out bigger than the area I selected. How do I fix this??

    I just got a Macbook Pro for Christmas, replacing my old 2008 one. On my old one, I was able to screen grab (shift+command+F4) specific area sizes (like 500x500 area) and the picture it would export would also be 500x500. On this new Mac, the areas I screen grab are exported larger than they are when I take them. For instance, I'd take a screen grab of a 500x500 picture I drew, upload it to an image sharing website, and it would appear nearly double that size.
    I've tried altering my display to see if that helps, but they always are bigger than what I grab.
    Any help would be great.

    To anyone who may have this problem, I figured it out. Retina display makes it bigger than it actually is. To fix this, after each screenshot, open up the image in preview. There will be a little toolbox option, and within that a box with arrows in it. Set the dimensions to 50 rather than 100 and it should be good to go.

  • Hi, I am using HP11 and iPlanet web server. When trying to upload files over HTTP using FORM ENCTYPE="multipart/form-data" that are bigger than a few Kilobytes i get a 408 error. (client timeout).

    Hi, I am using HP11 and iPlanet web server. When trying to upload files over HTTP using FORM ENCTYPE="multipart/form-data" that are bigger than a few Kilobytes i get a 408 error. (client timeout). It is as if the server has decided that the client has timed out during the file upload. The default setting is 30 seconds for AcceptTimeout in the magnus.conf file. This should be ample to get the file across, even increasing this to 2 minutes just produces the same error after 2 minutes. Any help appreciated. Apologies if this is not the correct forum for this, I couldn't see one for iPlanet and Web, many thanks, Kieran.

    Hi,
    You didnt mention which version of IWS. follow these steps.
    (1)Goto Web Server Administration Server, select the server you want to manage.
    (2)Select Preference >> Perfomance Tuning.
    (3)set HTTP Persistent Connection Timeout to your choice (eg 180 sec for three minutes)
    (4) Apply changes and restart the server.
    *Setting the timeout to a lower value, however, may    prevent the transfer of large files as timeout does not refer to the time that the connection has been idle. For example, if you are using a 2400 baud modem, and the request timeout is set to 180 seconds, then the maximum file size that can be transferred before   the connection is closed is 432000 bits (2400 multiplied by 180)
    Regards
    T.Raghulan
    [email protected]

  • Why are the PDF files in v27 bigger than in v25?

    I have just created a v27 version of my single iOS app, which has been v25 before. Now the app has a size of about 550 MB instead of about 430 MB. I found out that the PDF files of the slideshows are bigger  than before. What is the reason for this change and is there a way to get smaller file sizes again?
    Kind regards
    Michael
    No idea? At least someone of the staff should know why the DPS creates larger files now.
    There is another issue which indicates that Adobe doesn't care about file sizes. In slideshows the DPS always uses PNG files (if you don't choose PDF files, which are larger now, as I have told you). Of course it is because of transparency, but it would be easy to let the user choose between PNG and JPG like Twixl does.
    Message was edited by: Michael Kokoscha

    You should report this via Gold Support who will investigate this. Minor file size changes will always occure on releases, however since you report the size change is significant, there may be some issue and needs further testing.

  • Why are 'saved as' .psd files so much bigger than original raw nef files?

    I was under the impression that original raw files were the biggest possible. I appear to be very wrong. Why are 'saved as' .psd files so much bigger than original raw nef files?
    I'm beginning to think that saving them as psd is a bad idea.
    Yes, though I've heard all the arguments of keepng the original raw files (For ex. Did you throw away the negatives when you were using film) I se eno purpose in keeping them. Once I've made the initial adjustments--cropping, color correction etc. I don't feel a need to ever go back and never do. Most of my work is done in Photoshop and I like it that way--but suddenly finding myself with such huge files doesn't appeal to me at all--and other formats like tif...well never mind for now.

    Good point made c.pfaffenbichler however, my thinking is this--there is time spent on the raw file and then there is much more time spent on (usually a psd) the file once in Photoshop. For me to then go back to the orignal raw file, after having worked on it on PS would mean getting rid of all the work (larger amount of work, time wise and artistic wise) done on PS which seems pointless. Although the psd file does show your layers and stuff it only shows the end results of that layer. It does not show from where to where you pointed your brush, from what point to what point you changed the color or part of an image etc. etc.Anyhow I understand why most people keep their raw files, but this is the main reason why I do not. It would mean hours of work on an image you already worked on (and usually were satisfied with) to perhaps make some minor alteration. Also please note that though I was noce a pro photog, no I do it mostly for fun. Getting the exact red in my Coca Cola can has never been of importance. On the other hand, if there were a way of working on a raw file within Photoshop and keep it (save it as) a raw file equivalent, then I would absolutely do so.

  • Since syncing with iCloud all my photos in my photo app are much lower resolution than they were before. Can anyone explain what happened an how I might get back my high resolution photos?

    Since syncing with iCloud all my photos in my photo app are much lower resolution than they were before. Can anyone explain what happened an how I might get back my high resolution photos?

    Thanks again.
    Unfortunately I don't have iPhoto (running Windows).
    I did, however, figure out a work-around.
    I created an empty directory on my computer, and told iTunes to "Sync Photos from..." that empty directory. This deleted all the photos from the iPod (go figure).
    I then set the "Sync Photos from..." dropdown back to directory that actually contained all my photos, and sync'd again.
    And, yes, they all loaded onto the iPod at their better, higher resolution.
    Thanks for all your help. Photos (and wallpaper) are perfect, again

  • How can I make the playback buttons of YouTube and other plug-ins bigger since they are so tiny?

    How can I make the playback buttons of YouTube and other plug-ins bigger since they are so tiny in Firefox? I tried some suggestions that dealt with entering "about:config" in a fresh browser, but to no avail. I also downloaded an add-on called "Theme Font & Size Changer", but that didn't work either. So, I am reaching out here as that was a suggestion that another user here offered.

    Ah, yes- that is an ultra high DPI (dots per inch) display. This is a known issue in Flash Player, which Adobe is working on fixing.
    In the mean time, you can get some videos to have normal-sized controls by switching Youtube to the HTML5 video player:
    In Firefox, go to https://www.youtube.com/html5 and click the "Request the HTML5 player" button.

  • My jpeg file sizes are much larger than they used to be.

    Just recently the file sizes on my .jpeg files have become excessively larger than they used to be just a week or so ago. Where I used to go almost a week to need to archive to DVD a bunch of saved images, I've now got to save to DVD almost daily.
    For example, a 300x300 pixel image which shoud be about 32 Kb reads 383 Kb in the finder. I'm not doing anything to these images, just draging and droping.
    Where I used to get 7 K files on a DVD, I'm now getting less than 2 K files to each disc.
    Any thoughts on what's changed and how to fix it?

    What App & JPEG compression rating are you using, some apps can reduce file size by dropping colors for instance...

Maybe you are looking for

  • Conversion of Decimal to Binary String

    Hello Labview People: I'm rather new to Labview, so this may be a simple-minded question . . . I would like to take a numeric control and have the decimal input converted to a binary string of 8 bits. So, for example, if I were to put in the number '

  • Getting Dynamic Error Text for Error Handling in BPM

    Hello, is there any way to get the error message or further details on an exception handler in BPM? I would like to pass the detailed error description of the error that has happened in BPM to an alert using a separate Alert container variable. Is th

  • How to handle browser or application crash out of our application in java.

    I am running my application(testing automation tool) through ANT . when i run the same over the remote the browser is getting crashed. so if i need to handle it , i should handle outside my application. my application is written only in pure core jav

  • AV CHAT "im not responding..."?

    Ive been trying to video chat with my girlfriend and its not working. well she doesnt have a cam. but she at least wanted to be able to see me. i am using iChat and she is using the latest version of AIM on her pc running xp. she sends me a video cha

  • BAPI_SALESORDER_CHANGE Delivery Date at Line Item

    Hi Guys, We are trying to change the delivery date at the line item for a Sales Order using the date at the header.If we have a date change at the header,is there a way it can automatically change the date at the line item?can LOGIC_SWITCH field in t