Max vertical size problems

sun jdk 1.4.1
Why is the JTextFields maximum vertical size "infinite" by default ?
If it is resized taller then the preferred size, it looks stupid (
it has more space than needed for one line, but the extra space is unused ).
Which leads to the following problem : If I have a panel
with BoxLayout(X_AXIS) that contains a JTextField and a VerticalGlue,
the text field takes all the extra vertical space. The glue takes none !
Why ?
Shouldn't the extra space be distributed evenly accross all components ?
Actually this is what happens with other components, but JTextField seems to have some kind of higher priority and takes all the available space. Is this a bug ?
Similar problem with JSeparator ( a horizontal "line" ):
Why does it have a maximum height of 32767 ?
It is just a line, always 2 pixels ( or so ) high.
Now it takes up part of extra space, instead of always being 2 pixel high.
I am using the following code to fix these problems, but I think that I shouldn't have to, that those are some kind of bugs in Swing :
Dimension dim1 = new Dimension(stupidComponent.getMaximumSize());
dim1.height = stupidComponent.getPreferredSize().height;
stupidComponent.setMaximumSize(dim1);
Any comments ?
stein

Layout managers all have their areas of specialty. If you find yourself fighting with one of them to get what you want it might be wise to try a different one. We have lots of options available.

Similar Messages

  • How can I limit the vertical size of the plot legend?

    Hi all,
    in my program I use a waveform graph and its plot legend.
    My problem is that the vertical size of the plot legend increases out of my frame and screen if I add too many plots to the graph!!!!
    Is there a possibilty to limit the vertical size of the plot legend and/or to use a vertical scrollbar in the plot legend?
    I use LV 8.2.1 .
    Thanks
    daHans

    You can write to the "Active Plot" property node. The example given in the thread I linked to before shows using this. Did you take a look at that example?
    I'm only suggesting the alternative of an "Active Plot" control if you're trying to give the user the ability to manipulate one of the plots (like color, point style, etc). If you have a lot of plots, and the plot legend is too big, you can provide a numeric control where the user selects the plot, and then additional controls to set the properties for that plot. Not as intuitive as the plot legend, but if that's what you've gotta do, that's what you've gotta do. Attached is a simple example (LabVIEW 8.20).
    Attachments:
    plot.vi ‏21 KB

  • SharePoint - Error_1_Error occurred in deployment step 'Add Solution': Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was rea

    Hi,
    I am Shanmugavel, SharePoint developer, 
    I am facing the below SharePoint 2013 deployment issue while deploying using VS2012.
    If i will deploy the same wsp or existing wsp
    (last build) using direct powershell deployment, the solution adding properly, but the same timeout exception coming while activation the features.  Please find the below error.
    I tried the below activists:
    1. Restarted my dev server, DB server. 
    2. tried the same solution id different server
    3. tried existing wsp file (last build version)
    4. Deactivated all the features, including project Active deployment configuration.... but still i am facing the same issue.
    I hope this is not coding level issue, because still my code is not start running, before that some problem coming.
    Please help me any one.....  Last two days i am struck because of this...

    What you need to understand is the installation of a WSP does not do much. It just makes sure that you relevant solution files are deployed to the SharePoint farm.
    Next comes the point when you activate the features. It is when the code which you have written to "Activate" certain features for your custom solution.
    Regarding the error you are getting, it typically means that you have more connections (default is I guess 100) open for a SQL database then you are allowed to.
    If you have a custom database and you are opening a connection, make sure you close it as well.
    Look at the similar discussion here:
    The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool
    size was reached[^]
    I would suggest further to look at the
    ULS logs[^] to get better insight.
    Manas Bhardwaj's Stream : www.manasbhardwaj.net

  • Need info about max HDD size available for Satellite Pro M30-813

    Hello,
    The following question is mainly to be addressed to authorized Toshiba support personnel. What exactly is the limitation of a maximum size of an internal HDD that I could use with my Satellite Pro M30-813?
    Recently, I have bought and installed seagate 160 GB SATA drive, onto which I have successfully installed WXP Pro and have been running it for quite a while with no problems. Recently, I have been copying large amount of data from an external hard drive to my new internal disk, and as the files were being copied as I noticed having about 50 GB free space left, I had experienced windows "delayed write failed" and a massive partition failure with no possibility to recover data. The system would no longer boot and the whole MBR was damaged. As the result, I have lost all data on my new disk.
    Although, I realize that Toshiba is not responsible for additional hardware that I use with my laptop and that is not officially supported by Toshiba, I am certain that as an end user of a Toshiba product I have the right to know about a max HDD size limitation information for my notebook model. Therefore, I request Toshiba technical support representative to give me a straight official answer to my question.
    Thank you in advance,
    Andrejs
    (You may also contact me privately at my e-mail address)

    Hi Andrew
    > The following question is mainly to be addressed to authorized Toshiba support personnel
    I think you are in the wrong area if you are looking for an answer from an authorized Toshiba support.
    This is a Toshiba user-to-user forum! You will meet here Toshiba notebook owner and enthusiasts who share knowledge and tries solve problems but nobody from Tosh :(
    I could provide my experience with the M30 Satellite and the HDD upgrade possibilities.
    In my knowledge the Sat M30 supports a 40GB, 60GB and 80GB HDD for sure.
    In my opinion you could use the 100GB HDD but bigger HDDs will not run and functions correctly.
    So switch to a lower HDD size and enjoy the notebook!
    Ive goggled a little bit and found compatible HDD and the part numbers
    HITACHI GBC000Z810 -> 80GB
    HITACHI GBC00014810 -> 80GB
    TOSHIBA HDD2188B -> 80GB
    HITACHI G8C0000Z610 -> 60GB
    HITACHI G8BC00013610 -> 60GB
    TOSHIBA HDD2183 -> 60GB
    TOSHIBA HDD2184 -> 60GB
    I hope this could help you a little bit!
    Best regards

  • The reporting service web service connection pool reached the max pool size

    I got a problem that it throw an exception "The timeout peroid elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connection was in use and max pool size was reached."
    The satuation is our service use 15 thread to render report, but sometimes we met such exception I list above. I didn't change any configuration in rsreportserver.config, and it seems the connection to reportserver database from reporting service web
    service was not disposed.
    Is there any configuration I can modify to fix this issue?

    Hi Dexter,
    In your case, we can try to increasing the size of the connection pool to resolve the issue. By default, the Max Pool Size is 100. You can refer to the similar issue below:
    http://social.msdn.microsoft.com/Forums/en-US/c57c0432-c27b-45ab-81ca-b2df76c911ef/timeout-expired-the-timeout-period-elapsed-prior-to-obtaining-a-connection-from-the-pool?forum=adodotnetdataproviders
    Since the issue is related with ADO.NET. I suggestion you post the question in the following forum:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetdataproviders
    It is appropriate and more experts will assist you.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Max locate size

    hello, does anyone know the max locate size that a SNASw router will set for the locate process ?
    For VTAM is 16K, for the Cisco Snasw ?
    I can't find this on the doc and I think my "location" problem depends on this.
    Many thanks in advance to the people that will reply.
    Cheers, Alex

    Hi Alex,
    in IOS 12.1 and 12.2 snaswitch is bounded by a locate size of 1K, which means if you have more than 8-10 uplinks defined you may run out of room and encounter less-desireable session paths or outright session failures.
    An enhancement was added in IOS 12.2T to make the size 4K. If you want to stay with IOS 12.1 or 12.2 (because they are more stable than 12.2T), you can work around the problem by only configuring uplinks to your primary NNS/DLUS and backup NNS/DLUS, and use connection network for all other uplinks (vnname on port). Then snaswitch would only include 3 tail vectors in each locate (one to the primary, one to the backup, and one to the virtual routing node.)
    - Ray

  • Setting System-Wide Max Heap Size

    We want to set the heap-size of Java-Plugin 1.5.0_14 for a company-wide rollout to a fixed size under Windows XP.
    In deployment.config under C:\Winnt\Sun\Java\deployment I am giving this:
    deployment.system.config=file:C:\\WINNT\\Sun\\Java\\Deployment\\deployment.properties
    deployment.system.config.mandatory=true
    In the respective deployment.properties I am giving
    #deployment.properties
    deployment.cache.max.size=50m
    deployment.javapi.jre.1.5.0_14.args=-Xmx256m -Xms75m
    While the cache-parameter is taking effect (visible in the Java Control Panel) there is no change in the Max Heap Size.
    Any idea how this could be achieved?
    Thank you
    Michael

    MaxHeapSize I determine with Runtime.getRuntime().maxMemory()
    Setting it manually in the javacpl via -Xmx works fine but....
    Problem is that we do not want each user to open his Java Control Panel and set this value manually.
    May be error prone and difficult to communicate in a scenario where you have hundreds of users in different locations, countries etc.
    Should be possible to set this value once installing the Java Plugin
    Thank You
    Michael

  • "Could not create the Java virtual machine." when max-heap-size is 926Mb

    We received "Could not create the Java virtual machine." when the max-heap-size provided exceeded 926 Mb in XP PC. We found the below mentioned link which confirms that this is a bug
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6945136
    But the problem is that the issue does not get recreated in all the XP PCs. Increasing the max heap size to greater than 926 works fine in some XP PCs.
    Could there be any configuration related issues for this problem...

    If you can't find any difference in your java versions or overall runtime configurations, it's quite possible that the bug doesn't have the complete picture--it might be more subtle than the conditions described. Maybe it works with certain versions of certain lower level DLLs. Maybe it has some dependency on which services are running. Maybe the order in which certain components got installed put one version of something vs. another further ahead in a CLASSPATH, LD_LIBRARY_PATH, etc. variable.
    Or maybe it's as simple as you're not running the version of Java you think you are on all those boxes, as jschell suggests.
    Regardless of the reason why it happens to work on some configurations, you found that it fails on some, and that failure is in fact a known bug. So it shouldn't surprise you that it fails at least sometimes, and the fact that it works sometimes has been rendered irrelevant. Unless you're doing research into the specific cause of this issue.

  • Max heap size limits

    I've been looking around for information on the max heap size limits on Sun's JVMs but can't seem to find any information. Just by testing, it seems like the max heap size for Windows 2000 can vary from 1.3G to 1.6G depending upon the machine (JDK 1.4). Does anybody know where I could find actual documentation that describes the limits for Sun's VMs on Windows (2000 and Advanced Server), Linux, and Solaris? I'm about to file this as a documentation bug against the JDK.
    God bless,
    -Toby Reyelts

    There was an older thread in the forums that had some info on this - my quick search failed to locate it, ypu might want to spend some time looking. The basic problem is memory space fragmentation by the OS, where the OS locates items in memory and effectively constrains heap growth to the unfragmented area that the heap starts in.While there may be more "unused" memory, it's not contiguous. There is also some info in MS's MSDN data regarding this condition, with information on the various OS's. I think Linux has a similar "condition".

  • Calculating max image size for PNG inside an app?

    This should be simple, considering that Apple has published a formula for the max image size that an iPad will display. Here are the details ...
    I'm creating a "zoomable" image for use in an app. The PNG is fed into the app via an iframe. It's zoomable because the dimensions stated in the HTML are smaller than the real image dimensions. The person looking at the app uses the "finger spread" method to make the image expand. Sounds odd, but it works. Base image resolution is 264px for retina displays.
    Yesterday I tried an image that was 2768 x 4221 pixels and the app simply refused to display it. When I changed it to 1000 x 1525 it displayed fine. Problem is, that should not have worked. Apple says the max pixels for an image on iPad cannot be more than "width x height = 3 x 1024 x 1024"  That base formula works out to 3,145,728 pixels. Using Apple's math, my image that displays fine has a total size of 4,575,000.
    So I'm confused about how to calculate the correct max image size. Apple's formula looks pretty simple but I apparently broke their rule and got away with it. Help?

    Arggg.-
    The multiplier "3" is only applied on the "1024 x 1024" side, not also on the side where the developer's image width and height are multiplied.
    Arggg Argg ...

  • Max fetch size in DataScrollerComponent

    Hi
    If i cap a max fetch size of 2000 on a query that i know will return 8000 rows the DataScroller still reports 1-rageSize of 8000 ?
    If i try and navigate past row 2000 the component correctly sees the max fetch size and displays 1-rangeSize of 2000 ??
    Whats going on ?
    Thanks
    Matt

    Got to the bottom of this by replacing a the code in the DataScroller component so we could view (and change) the source code. The component files are :
    ScrollBarTag.java - used in <jbo:DataScroller> tag
    DataScrollerComponent.jsp - the page that renders the dropdown list and next / previous values
    DataScroller.java - the bean used in the jsp that contains state information about the current datasource.
    When the DataScroller bean is initialised it sets up range values to enable calculation of entries in the scroller (e.g 1-100 0f 1000000). It derives the datasource from PageContext and looks at the RowSet directly.
    The problem is that it uses the getEstimatedRowCount() API on the RowSet driectly (i.e. not via the ViewObject).
    This figure returned doesnt consistently obey a cap on the max fetch size and will be a nasty bottleneck if you are querying on very large result sets. Mysteriously, if you try to navigate past the end of your maxFetchSize in the scroller the second pass through the code will get the estimated row count correct and obey the cap on maxFetchSize ?
    If you change the call to use the getRowCount() API instead, this figure seems to consistently obey the maxFetchSize cap.
    We had to look into this code as this component will perform very badly against 6 and 7 figure ResultSets as its not taking into account any caps set.
    As a matter of interest, changing the code in the bean to ask the view object directly for its getEstimatedRowCount() seems to consistently obey any caps !?! :
    ds = Utils.getDataSourceFromContext(pageContext, dsName);
    RowSet rs = ds.getRowSet();
    ApplicationModule am = rs.getApplicationModule();
    ViewObject dvo = am.findViewObject(Constants.SOME_DVO);
    if (dvo != null)
    System.out.println("dvo "+dvo.getName());
    System.out.println("est rows "+dvo.getEstimatedRowCount());
    System.out.println("rows "+dvo.getRowCount());
    This code will get the figure right and if run before the
    rs.getEstimatedRowCount seems to force the correct value in the RowSet.
    Matt

  • Jms max message size

    I have seen some previous posts but have not found any answers. I am having problems with the onMessage method of a MDB. I am getting a java.lang.OutOfMemoryError for particularly large TextMessages...(2 megs)..Is there a setting somewhere to allow for large messages?
              Thanks for your help.
              

    Hi Karen,
              There is no max-message-size by default, except at the network
              layer of WL outside of JMS (10MB). You are simply running out
              of JVM memory. Increase the amount of memory for your server,
              perhaps decrease the number of MDB instances in your pool, and consider
              decreasing the size of the message backlog. Extra memory is consumed
              in the backlog of messages that have been passed to the MDB
              but haven't been passed to onMessage yet. You can configure the max
              size of this backlog (which defaults to a size of 10) by configuring
              a custom connection factory for the MDB, specifying the JNDI name
              of the custom connection factory in the weblogic descriptor,
              and setting the custom connection factory's "MessagesMaximum" lower.
              If you are creating a custom connection factory for topic MDBs
              be sure to set the acknowledge policy to "before".
              Tom
              P.S. Also consider compressing your messages in your application
              prior to passing them into JMS. Text tends to compress hugely.
              P.P.S. Just in case you don't realize - java Strings consume
              2 bytes per character.
              Karen wrote:
              > I have seen some previous posts but have not found any answers. I am having problems with the onMessage method of a MDB. I am getting a java.lang.OutOfMemoryError for particularly large TextMessages...(2 megs)..Is there a setting somewhere to allow for large messages?
              >
              > Thanks for your help.
              

  • Max-stack-size - default_stksize

    Hi,
    First, sorry for my english ^^
    I'm new on Solaris. I installed Solaris 10 on Sun V490 . I use Core Network.
    Why with the default setting, daemons or process of the OS "don't work" like this:
    Jun 17 14:50:10 unknown genunix: [ID 883052 kern.notice] basic rctl process.max-stack-size (value 8683520) exceeded by process 353In this example I generate the error with the format command. But I get this error with other command or deamon like nscd.
    I had the same problem with the value max-file-descriptor. The values set by projmod for the system project did not seem take effect. Thus I used the "old" parameters rlim_fd_cur, rlim_fd_max. Now it's ok.
    I find this parameter default_stksize in the Sun documentation. I put this in my /etc/system file:
    set default_stksize=16384At the boot time I have no error message for the value, but the max-stack-size value is the same:
    prctl -n process.max-stack-size 130
    process: 130: /usr/sbin/nscd
    NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
    process.max-stack-size
    basic 8,28MB - deny 130
    privileged 127MB - deny -
    system 2,00GB max deny -
    nscd is in the system project:
    ps -p 130 -o project
    PROJECT
    system
    Thank in advance, any idea is welcome.
    Guillaume

    Hi Prasad,
    Block Size is the number of parallel processes that are being executed in background during the application.  This is normally a configuration activity to be configured in line with basis.
    In Block size, we enter the number of objects to be processed per block by the CIF comparison/reconciliation during data selection in SAP APO or in the partner system.
    If you increase the block size, the memory required also increases. This has a positive effect on performance. If processes are cancelled due to lack of memory, you can decrease the block size to save memory.
    If you do not enter anything here, the system determines the block size dynamically from the number of objects that actually exist and the maximum number of work processes available.
    Normally, when you execute a job in background, it picks up the application server automatically or by manually defined server.  In parallel processing, at a time, one or more job of the same identify can be triggered under this scenario by defining application servers.  But too many parallel processing activity will affect the performance.
    One needs to define the parallel processes also to control system behaviour.  The Parallel processing profile is defined for parallel processing of background jobs. You then assign these profiles to variants in the applications.
    Regards
    R. Senthil Mareeswaran.

  • Max memory size of timesten database

    Hi all
    I wanna create a database of 2G-size in timesten.The permanent size is set 1536MB and Temporary Data Size is 512MB.
    Following errors occur when connecting.
    +837:Cannot attach data store shared-memory segment, error 8+
    +703:Subdaemon connect to data store failed with error TT837+
    The command failed.
    Then I find that the max permanent size is up to 944MB when connecting susscefully.
    In addition,the environment is win2003 sever enterprise sp2 32bit, timesten 11.2.1 32bit and 4G memory.
    Thanks a lot!

    Unfortunately, 32-bit Windows is one of the most limited environments for TimesTen due to the way that Windows manages the process memory map for attached DLLs leading to a very fragmented process memory map.
    Note that TimesTen needs to be able to allocate a shared mapping from the paging file of size (PermSize + TempSize + LogBufMB + ~20 MB) and this needs to be able to mapped as a contiguous segment into the address space of all processes connecting in direct mode (such as the sub-daemon).
    With PermSize = 944 MB, TempSize = 512 MB and assuming you are using the default of 64 MB for LogBufMB then the total memory requirements for this datastore are ~1540 MB which is pretty much the largest that is likely to be possible on 32-bit Windows. If you need more permSize you should consider reducing te,pSize to compensate. Do not reduce LogBufMB. The default of 64 MB is only suitable for read-mostly applications; if your workload will include a significant percentage of insert/update/delete then you may even need to increase it to get optimal performance.
    Note also that even if you mange to load a datastroe that is close to the limit, applications may have problems connecting in direct mode if the application uses a lot of DLLs, or i it is Java with a large heap etc.
    Unfortunately, 32-bit Windows is not a great platform in this respect. 64-bit Windows is far superior (when coupled with 64-bit TimesTen) and you do not face these issues due to the mush larger process address space.
    Chris

  • Max. video size on iPhone

    I know there is a lot of articles about this but I didnt find straight answer about this because some say this and some say that.
    So. I want Rip my DVD on Maximum Size and quality so I can watch it on ma Laptop or TV but still be able to put it on iPhone. Because I dont have iPhone yet but want to start rip my DVDs I need to know from somebody who done it...
    1. Whats the Max. Size I can rip and still be able to put it on iPhone (probably iPhone3)
    2. I know that ideal would be 640x480 but I heard that 720x400 can be put on iPhone without any problems.
    Lets say I will do it in 720x400 how its gonna appear on iPhones screen.

    This is directly from the iPhone Specs Page
    Video
    * Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
    http://www.apple.com/iphone/specs.html
    If you happen to have a High Def movie from iTunes Store in iTunes. You can right click on it, Get Info, And this will tell you the total size of that. It may be bigger then what the Specs show.
    Also keep in mind on Discussions we can not discuss the ripping of DVD's

Maybe you are looking for

  • Itunes has encountered a problem and has to close.

    When I opened iTunes the first time today, I had no problem, but then I went to the store, then my computer froze, so I closed it.. And now I downloaded the update and whenever I try to open it a box pops up saying "iTunes has encountered a problem a

  • 6.0.1 seems to have fixed my iPhone 5 battery life. Hypothesis as to why inside...

    So after installing iOS 6.0.1, and being COMPLETELY angry with no mention of the battery drain glitch being resolved in the patch notes, I'm pleasantly surprised that I can report that my battery life is now BETTER than my iPhone 4 was. This is like

  • Problems in use of querys  with Multiprovider in version 7.0

    I have version 7.0 of BI and have created a multiprovider based on 2 ODS, but when I use a query I am not appear in the query ratios for the second ODS. When I go to look directly into the multiprovider ratios of the second ODS listed as 0, when actu

  • String Comparision in JSTL

    have to do something like this if(product.equals("ABC")) { } else { Trying to use <c:choose> <c:when test="${product == 'ABC'}'"> ------ is this correct????? </c:when> <c:otherwise> </c:otherwise> </c:choose> thanks.

  • Create ASM disks on Solarix X64 fails with ORA-15031

    I am trying to create a ASM disk group on SOLARIS x64 using a NETAPP LUN. Below are the disks which are configured SQL> show parameter asm; NAME TYPE VALUE asm_diskgroups string DATA asm_diskstring string /dev/rdsk/c2t9* asm_power_limit integer 1 asm