Problem to automatically adjust JDialog size

Hello all,
i have a form (JDialog) which consist of some jlabels and jtextfields.
There is a JLable on the top of the JDialog - which will be used to show hints or errors.
The user fill the form and press save.
If the validation was not succeeded, the JLable on the top shows text.
jlblText.setText("<html><body>Error. Please do this and that. </body></html>")
view.pack();This text can have different length, so I put it in html tags for wrapping.
The problem is: top JLable changes its height so, that all buttons and some text fields below go down and are invisible. JDialog doesn't adjust it's size, after the height of the lable was changed.
The following code shows the same height of the jlable as it was before. No matter, whether I input 20 lines of text or 2 words.
System.out.println("height = "+view.jlblText().getHeight());If I knew the real heigh of the jlable, I could adjust the size of the view.
I don't know, why JDialog doesn't adjust it itself, if the height of the lable was changed.
JScrollPane could solve my problem. But it can't be used in this case.
Thanks in advance.

Three suggestions:
1) create a SSCCE so we can see your relevant code and play with it. Look here for more info on this:
http://homepage1.nifty.com/algafield/sscce.html
2) Repost this in the Swing forum. You've a better chance of getting good swing help there.
3) Search through these forums, especially the Swing forum. This problem pops up at least once a week.
Good luck!
Message was edited by:
petes1234

Similar Messages

  • Rich: calendar problem when automatically adjust clock for daylight saving

    Hello, I'm in trouble when the option to automatically adjust clock for daylight saving time is marked. My locale is pt_BR, and when I try to select the day it simply returns to 17.10.2010 on 16.10.2010 took the test in the following component and realized that the same problem occurs when the Windows clock option is selected .
    http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?tab=usage&cid=15374785
    I also noticed that this problem occurs in all components of the JSF schedule, no matter what the distribution
    http://www.primefaces.org:8080/prime-showcase/ui/calendarDisplay.jsf
    Question is, how to make the jsf solve this problem without having to uncheck the Windows clock?
    See below for the following attempts to try to fix the problem:
    faces-config.xml file
        <locale-config>
             <default-locale> en </ default-locale>
             <supported-locale> en_US </ supported-locale>
             <supported-locale> of </ supported-locale>
             <supported-locale> fr </ supported-locale>
            <supported-locale> es </ supported-locale>
            <default-time-zone-id> Brazil / East </ default-time-zone-id>
        </locale-config>
    {code}
    Created file DateTimeZoneConverter
    {code:java}
    import java.util.SimpleTimeZone;
    import javax.faces.convert.DateTimeConverter;
    public class extends DateTimeZoneConverter DateTimeConverter {
         public DateTimeZoneConverter () {
            super ();
            SimpleTimeZone stz = new SimpleTimeZone (7200000, "Brazil/East");
            this.setTimeZone (stz);
    {code}
    In the example above I'm forcing the useDaylight is false.
    In component:
    {code:java}
    <rich:calendar id = "periodoVigencia" enableManualInput = "true" datePattern = "dd / MM / yyyy" inputSize = "10"
               value = "# () contratoMBeanList.criteria.dataInicioVigencia"
               label = "# (msg ['contrato.consultarContrato.field.periodovigencia.label'])">
               <f:convertDateTime pattern="dd/MM/yyyy" type="date" dateStyle="short" timeZone="GMT-3"/>
    </rich:calendar>
    {code}
    and in the web.xml file
    {code:java}
    <context-param>
         <param-name> timezone </ param-name>
          <param-value> GMT-3 </ param-value>
    </context-param>
    {code}
    But nothing worked. And now what do I do? How to fix this problem, there are some more configuration to be done? Help, please!
    P.S.:Apologize for my english, I'm Brazilian.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Like I said, were attempts to resolve the error.
    OK, now how to solve this problem? Try the test in your area by selecting the day that DST occurs, you will see what will happen the same problem (to select the day that DST occurs on the screen will return one day less), do the test with the demos that I put in the first post, rich: calendar and prime: calendar.
    I do not know if it helps, but I noticed the firebug firefox debugging, it does not matter the way you change the locale or timezone, as the current date from the calendar javascript will always be the standard of the machine running the component.

  • Problems with Automatic Adjust row height in FRs ver. 11.1.2.1.103

    Hi
    We have just upgraded to 11.1.2.1.103 from 9.3.3.
    .103
    We had a fairly complex report that worked in the previous environment, but not anymore.
    We have a number of text lines with that pulls from other lines in the report that are hidden.
    It is celltext that we are reporting on.
    The lines are setup, so the row height should just adjust depending on the amount of text, but it does no longer work for consecutive lines with the adjust row hight atribute swithed on. I now have to insert blank text lines with a fixed height in between to get it to work.
    It makes the report the report look messy, so has anyone had similar issues and know a work around or a possible patch.
    KR
    Per

    Okay,
    I tried that I when I tried to use: sqlplus -s I got the following results
    SQL> sqlplus -s
    SP2-0042: unknown command "sqlplus -s" - rest of line ignored.
    I am also still getting the following in my output:
    Any other suggestions?
    SQL> Select
    2 'Siebel CVP' as Source_Name,
    3 'RCI' AS Brand,
    4 'Phone' AS Channel,
    5 'Inquiry' AS EBR_Type
    6 FROM dual;
    Siebel CVP RCI Phone Inquiry
    SQL> set head on
    SQL> Select
    2 substr(con_home_ph_num,1,10) AS Chan_Addr,
    3 'No EBR Date' As EBR_date,
    4 substr(x_rccl_brand,1,3) AS Brand,
    5 'Phone' AS Channel,
    6 substr(con_person_uid,1,21) AS Src_Id,
    7 substr(x_rccl_source,1,23) AS EBR_source,
    8 'Inquiry' AS EBR_Type
    9 FROM
    10 siebel.eim_contact
    11 WHERE
    12 con_home_ph_num is not null and
    13 con_home_ph_num > '201'
    14 and length (con_home_ph_num) = '10'
    15 and con_home_ph_num <> '0'
    16 and con_home_ph_num <> '1111111111'
    17 and con_home_ph_num <> '9999999999'
    18 and con_home_ph_num <> '0000000000'
    19 and con_home_ph_num NOT LIKE '+%'
    20 and con_home_ph_num NOT LIKE '0%'
    21 and con_home_ph_num NOT LIKE '123%'
    22 and con_home_ph_num <> '2222222222'
    23 and x_rccl_call_type is null
    24 and x_rccl_brand = 'RCI'
    25 and TO_DATE(TO_CHAR(x_rccl_entry_date, 'MM/DD/YYYY'), 'MM/DD/YYYY') >= TO_DATE(TO_CHAR(sysdate, 'MM/DD/YYYY'), 'MM/DD/YYYY')
    26 and x_rccl_source IN ('CTI','CTI_GVS','CTI_HOTWEB','CTI_PRE_SHOPPING_CALL','DIR_PASTGUEST_RECONNECT')
    27 ORDER BY
    28 con_home_ph_num asc
    29 /
    CHAN_ADDR EBR_DATE BRA CHANN SRC_ID EBR_SOURCE
    EBR_TYP
    5167350937 No EBR Date RCI Phone Prospect - 1-3IIJ-218 CTI_PRE_SHOPPING_CALL
    Inquiry
    8054977010 No EBR Date RCI Phone Prospect - 4861358 CTI_PRE_SHOPPING_CALL
    Inquiry
    SQL> spool off

  • Adjust page size dynamically ?

    Hi,
    i have a page with 2 iView created from PAR (URL isolation mode), i need the page to dynamically adjust the size to fit with the size of both iView together.
    At this point i set the height type to automatic, but when the iView reached its maximum page height. Then it comes two scroll bars in pararell one in each iView and another one in Page.
    how can i dynamically adjust iFrame sizes for both iView?? i heard that i can be done with javascript??
    Thanks in advance

    Hi Matt,
    check out this blog..might b helpful
    Avoiding scrollbar problems in URL iViews
    regadrs
    Amit
    P.S. reward points if helpful

  • Is there any function to automatically adjust the voice volume in the multitrack

    I'm trying to mix voice sounds and music files into one track. Sounds easy! But almost every music has its loud parts(for example the climax) and quiet parts. Therefore when i listen to the voice and the music at the same time, the voice files are sometimes relatively too quiet and sometimes to loud. I don want to adjust the volume pan one part after another because I have a lot of files to mix. Could you tell me is there any function I can use to automatically adjust the voice volume to make it always 'just a bit higher than the music'? Or can I read some documents about this problem?
    Thank you very much!

    Sounds like you want to do what is called "ducking" & "side chaining".
    First try using a compressor and or limiter on the voice tracks to get a more even volume.
    Google: Audio Ducking tons of stuff on how to.
    I myself have never tried this with Audition, or the compressors that come with it. I have done it in other multitrack software and older versions of Dave Browns Compressor.
    Duff

  • How do I adjust the size of program fonts to accommodate low vision users?

    Is it possible to adjust the size of program text to accommodate low vision users, like an enlarge text button or CTRL + zoom text function like in my browser?
    I know I am not the first person to approach this issue.  Since PSE 5 the text sizes have been getting smaller each version and even harder to read, and now that screens are much larger, it makes the menu text even smaller. I predict that by v. 20, users will have to just memorize where to put their cursor to click on a menu item.
    I have already adjusted my system text sizes to 175% but it does no good for PSE, if I use the zoom entire screen, I can only view 1/4 of the workspace at a time. There really should be an easy way to personalize your workspace. I have to reduce my screen resolution to 800x600 and change back to 1920x1080 to view the item in it's intended location each time I edit or create images and cannot work on the document that I am creating or editing a graphic at the same time.  What a huge inconvenience. 
    I have resorted to keeping my binoculars next to my computer for just this reason.  Picture it... binoculars to select anything on a menu.  In a way I feel like a prisoner.  Who are the quality control people, anyone that suffers with low vision? The last major problem I had to live with, PSE 10's gray on black! Find the scroll button when your eyes are tired! LOL.
    There are major reasons why I stick to PSE too, so changing programs is not a viable option for me.

    popsierose
    I am assuming that you are on Windows 7, 8, or 8.1 64 bit.
    Not sure if there is another way, but the way that works for me
    a. right click the computer taskbar, and click on Cascade Windows
    b. in the Premiere Elements Expert workspace, go the the bottom right edge of the workspace view, place the mouse cursor at that point until its tip has a diagonal icon, and then drag upward right to left diagonally to give some view of the desktop where I have the file for the drag and drop into Premiere Elements....then drag and drop the supported file into the Timeline or Project Assets or a drag and drop location.
    Please let us know if that worked for you.
    Thank you.
    ATR

  • F5061  Balance in local currency EUR is too large for automatic adjustment

    My Company code currency is EUR. The customer has made a downpayment in USD (say 100) and i am now to clear the same against invoice of same amount in USD (100 $) but its is resulting into minor differences in Local currency. I am getting the following error
    Balance in local currency EUR is too large for automatic adjustment
    Message no. F5061
    Diagnosis
    For postings in foreign currency, it is possible that the balance in foreign currency is zero, but not in local currency. Providing the balance in local currency does not amount to more currency units than the document has line items, the system adjusts the amounts automatically. If an automatic adjustment is not possible, the amounts must be adjusted manually in local currency.
    System Response
    The document is not posted in local currency without adjusting the amounts.
    Procedure
    Adjust the amounts in local currency.
    How can i have the system automatically fetch the Gl accounts to post the exchange rate differeces.
    I have maintained the settings in FBKP- Exchange rate differenes
    Thanks & Regards
    Pooja

    Hi,
    I have the same problem; my company code is defined in HUF and I am trying to post a vendor invoice in Euros.
    I have a 10% maintained there and still receiving the error, either for differences of just one HUF. The strangest thing is that differences are automatically adjusted (also for discrepancies over the 10%) when posting through FB60 but not when using FB01.
    Any idea?
    Thanks in advance for your input.
    Best regards.

  • JTabbed pane, adjusting tab size where tab name is shown

    Hello,
    Does any one know if it is possible to adjust the size of a the tab which displays the name of the tab on a JTabbedPane? I know it will adjust horizontally automatically based on the String you provide for the title, what I want to do it adjust it vertically also. I tried using "\n Main Menu\n" as the title thinking that it would add two extra blank lines but this didn't work. Nothing in the API looks like it will do what I want either. Can anyone tell me if this is possible or if there is a work around?
    Thanks
    Mike

    I've never tried it on a JTabbedPane but check out the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/html.html]Using HTML in Swing Compoennts.

  • Adjust Photo Size For Web Gallery

    I'm uploading a new Web Gallery as I type this....(although nothing appears to be happening at the moment...I decided against my first couple of efforts and deleted those galleries).
    I don't see a way to adjust the size of the photos uploaded to the Web Gallery. As each of the photos I'm uploading is approximately 3MB in size, I was hoping there might be an option to compress each of the photos prior to uploading. Am I missing it?
    In iPhoto Help, there's a topic for "Choosing the Appropriate Size For Your Photo". Apparently, this only refers to emailed photos, though?
    Any thoughts on this?

    Mike:
    Have you checked on the size of the files uploaded to the web gallery? They are resized to 800 x 600 pixels. If you select the option to have the full sized image downloaded then the max pixel dimension is 3054 pixels in any direction. If the are larger than than the get resized. Additionally the file is compressed. My 2.7 MB file was downsized to 750 KB.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Adjusting border size when printing

    I'm trying to print photos. Last time I did this, I could adjust the size of the image within the given paper size (4x6) with a simple slider control. This made the white border around the picture bigger or smaller accordingly. I'm not finding the slider this time. Has something changed, or have I forgotten how to do that?

    You must have been using iPhoto 6 the last time as that's not available any more. There are themes now with different border options but no continuously adjustable border width.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Adjust image size

    this is probably insanely easy, but I can't figure it out. I need to adjust JUST the height of and image, but when I resize it, it automatically adjusts both the height and width of the image.
    This is ******* ******* me off. how do I turn it off. I know that it used to be if I held down shift, it would adjust it so the dimensions ratio are the same. but now it does it all the time.

    Hi!
    You are not wasting Internet space. You had a problem which you found the answer to. You also did, which I liked the best, give the solution to your problem for others to read and learn from!

  • Attached photos are automatically reduced in size - how do I stop this?

    iPad mini using Mail. My wife somehow changed a setting and it doesn't ask what size I want to send the photo as, it just automatically sends it as a reduced file size. I'd like the option to chose each time I send one.

    Photos that you take with the front facing camera - the FaceTime camera - cannot be reduced or enlarged in size. Apparently the front facing camera must automatically optimize the for FaceTime and the size cannot be adjusted.
    As far as I know - all other photos (screenshots, saved from websites or emails, rear facing camera photos) can be reduced in size - or sent in a larger size if they are reduced automatically when inserted in the email.
    If you are sending multiple photos in one email - if one of them is from the front facing camera - I believe that will preclude you from adjusting the size of any of the other photos as well.

  • Photoshop Elements 11 help.  Adjusting the size of a JPEG

    Hi everyone.  I am an artist and am having trouble adjusting the size of my JPEGs.  I have Elements 11.  I am sure the solution is quite simple.  When I want to adjust my JPEG height to 900 pixels,for example, I go the the "Document Size."  I can type in 900, but the options are only in inches, percent, cm, mm, points, picas and columns, NOT in pixels.  On the top, it reads, "Pixel Dimensions," but I do not see any way to adjust the dimensions in that spot.  Is there a way to do this?  I run into this problem every time I go to adjust the size of a JPEG, and eventually have to ask a friend to adjust them for me.  Please advise me on this!  Thank you so much, Adrian

    Image >> Resize >> Image Size
    You need to put a checkmark in the resample box and then you can adjust pixel dimensions.

  • Why can't I adjust the size/proportions of objects anymore?

    This problem has been happening intermittently today. The resizing squares around all of my objects have disappeared and I can no longer adjust their size or dimensions. I have tried resetting my tools as well as deactivating and reactivating my account (this worked once, but now the problem has appeared again).

    Hi. Because the forum you originally posted in is for beginners trying to learn the basics of Photoshop, I moved your question to the Photoshop General Discussion forum.

  • Help! Why does Aperture automatically adjust my white balance?

    Hey,
    Just wondering if anybody knew why Aperture seems to want to automatically adjust the white balance settings of the RAW .NEF images I've been importing. I mean, on an example image, the in camera white balance was about 5900K with no hue adjustments, but when I imported it into aperture, it looked completely different. Sure enough, Aperture had set a color temp of 5475K and a hue of -22. If I wanted it to be adjusted, I would've asked, but I spent the time getting the white balance right in camera for a reason. I really don't want to have to go back and adjust every image manually. That would defeat the purpose. Please, lend some insight.

    I have a D80. Do you think apple will eventually develop a solution to this problem, or some sort of workaround? In the meantime, might I be better off just using the proprietary software, like captureNX? Or, how about adobe camera raw?

Maybe you are looking for

  • Creating Pivot Table in XML Publisher having Completed Warning Status

    Hi guys, I really need you expertise on this. please help :( - I created a Conc. Program that has XML ouput Named Sales Report. - Then I connect that to my sales.RTF template. this is always been what i'm doing and its fine but my case now is that. -

  • How to gradually change the brightness in a movie

    Hi I have done a lipdub in my school last week and i have a problem when i view the movie: The light is very bright in some places and some other places are too dark. I found a way to change the lighting but it's not gradual. It's very brief and it c

  • Mail 5.1 port 993 time out

    Hi since 2 days ago , I face problems in my mail 5.1 mail can't connect to prt 993 , $ get me time out error , I try to recreate my account & mail get me "The Google IMAP server "imap.gmail.com" is not responding. Try checking the network connection,

  • Asa 5520 "loosing" code after code has been put in and operating

    Sorry to ask this if it has all ready been covered.  We have an asa 5520 running 8.3.2(1) code.  Three times now I have entered code and rules in our asa and had things working, only to have the code "dissapear" and thus things stop working.  We upgr

  • How to Preview Illustrator file in Vista Explorer?

    With almost all software installed on Vista, I can use Explorer's 'Organize', 'Layout', 'Preview Pane' to see a giant preview of my files. However, the Adobe files only show generic icons. How can I see a preview of my Adobe files in the Preview pane