How does JEditorPane determine its preferred size?

Could someone explain how JEditorPane determines the initial preferred
size? Its default sizing is not giving me what I need and I'm not sure
how to control it, other than explicitly setting the size with
setPreferredSize().
A simple example:
        String s = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 10 20" +
                   "21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39";
        JEditorPane ed = new JEditorPane("text",s);
        JPanel pan = new JPanel();
        pan.setLayout(new BoxLayout(pan,BoxLayout.Y_AXIS));
        pan.add(ed);
        JFrame f = new JFrame();
        f.getContentPane().add(pan);
        f.pack();
        f.setVisible(true);This code generates a window that shows one line, with "1 2 3 4 5 6 7 8 9"
showing. I'd like to have a larger area showing initially.
Does the choice of layout manager effect this? (I actually prefer to use
TableLayout; the above example with a 1x1 TableLayout and widths set to
PREFERRED yields exactly the same results.)
Thanks,
bw

Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
From the Transform panel you can set a text box's width and height

Similar Messages

  • In InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to

    This may be a basic question... but in InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to determine what word count we can fit in, and c) how to do it in a table? Thanks!

    Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
    From the Transform panel you can set a text box's width and height

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • How do you determine the optimal size for Mozilla Firefox?

    How do you determine the optimal size for cache in Mozilla
    Firefox? I am using Firefox 7.0.1 on a 64-bit Windows 7 Ultimate operating system with 3GB RAM and 300 GB hard drive, but I have other computers running Windows XP. If the answer doesn't apply to all current versions of Firefox on all supported Windows operating systems, please explain the differences. Is there a formula for calculating the best cache size?

    I found that the best idea is to let Firefox decide that itself.

  • How does vendor determine if no info record is maintained for the material

    how does vendor determine if no info record is maintained for the material

    Hi
    If you have to determine a vendor, the minimum requirement is Info record. Beyond that, you can ofcourse maintain Source Lists, Quota Arrangements but Info record is bare minimum for automatic determination of vendor.
    Otherwise, you have to maintain the vendor manually in th Purchasing docs.
    Tcodes for Info record are ME11, ME12, and ME13.
    Hope this clarifies.
    Thanks

  • HT1222 how do i determine the file size of each download before i download it?

    How do i determine the file size of a down load before i download it?

    I have checked the update page and even checked more and can find no reference to file size.  I'm using a hotspot and some of the downloads cause me to go over my limit and incur extra charges.  I apperciate your help.

  • How does SharePoint determine files are duplicates in search results?

    In the search results, some files are grouped as duplicates (a hyperlink view duplicates appears under the search result).
    How does SharePoint determines that 2 files are duplicates?
    How does SharePoint determines the one that is shown in the search result (the 'main' file)?
    Can we influence both?
    Patrik | My Blog

    I don't know if this helps, but I've been looking into the same problem that's come to light a few times during troubleshooting customised deployments of SharePoint recently.  This is my understanding so far (paraphrased from http://blogs.technet.com/harikumh/archive/2008/11/14/some-interesting-facts-about-sharepoint-2007-search.aspx):
    Document similarity or matching for the purposes of identifying duplicates is based only on a hash of the content of the document.  None of the file properties are used in calculating the hash (i.e. things like filename, author, create and modify dates are not used).  The SQL table MSSDuplicateHashes in the SSP’s search database holds all the 64bit hashes necessary to determine if one document is a near-duplicate of another against each indexed document.  This table is read while doing a search to determine duplicates if removal of duplicates is enabled.
    Steve

  • How  does systemn determin pricing procedure of billing type

    How does system determinate pricing procedure of F2???????????????????
    By doc.pric.proc? but in IMG, it is empty!!!
    and I don't think it is reference sales order's pricing procedure
    because if you use OR + TAN, the reference document of billing is delivery order!!!!!!

    Hi zhang
    In pricing procedure determination OVKK , whatever DuPP you maintain that is linked to Billing document
    In VOV8 we can see the CuPP  of the document . so if the DuPP is linked to CuPP in OVKK then the same pricing procedure will be flowing to billing document also  . Apart from that in VOV8 also make sure that , in billing data you are maintaining the billing  type
    Regards
    Srinath

  • How do I determine expected output size for System Exec vi

    I am running a DOS exe from a Batch file using the System Exec vi. My exe is programming software for a microcontroller and passes data to the programmer via the serial port. When I run the batch file externaly to LabView it works fine. When I run the same batch file using the System Exec vi I get an error from the programmer app (DOS app). Not every time but usually within 20 attempts. I reduced the execution priority of my vi's to give more time to the DOS window. This seems to have helped but hasn't solved the problem completely. I read in the help file that LabView will run more efficiently if you specifiy the expected output size in the System Exec vi, but how do I determine it? Is the expected output
    size the size of the bat file I call?

    > I am running a DOS exe from a Batch file using the System Exec vi. My
    > exe is programming software for a microcontroller and passes data to
    > the programmer via the serial port. When I run the batch file
    > externaly to LabView it works fine. When I run the same batch file
    > using the System Exec vi I get an error from the programmer app (DOS
    > app). Not every time but usually within 20 attempts. I reduced the
    > execution priority of my vi's to give more time to the DOS window.
    > This seems to have helped but hasn't solved the problem completely. I
    > read in the help file that LabView will run more efficiently if you
    > specifiy the expected output size in the System Exec vi, but how do I
    > determine it? Is the expected output size the size of the bat fi
    le I
    > call?
    If you think it is due to timing, and you wish to yield to the DOS app,
    don't just lower the priority of LV, but use Wait ms to put overeager
    diagram elements to sleep and limit their loop rate. Use the task
    manager or performance monitor of the computer to determint if this is
    the issue.
    Greg McKaskle

  • How do you Determine the Largest Size/Fastest Speed Hard Drive

    In general, how do you determine the maximum hard drive size/speed you can upgrade to?

    As long as the drive your are considering physically fits as already stated there is no maximum size you can install. Please complete your profile so we know what machine you have.
    If your machine is covered by a warranty or AppleCare I would recommend against installing another HD as this may invalidate the warranty. I would recommend in that case using a Firewire 800 external HD instead.
    Regards,
    Roger

  • What exactly are Upcoming Songs & how does iTunes determine them?

    I've never really bothered with Party Shuffle before but it always bugged me when it gave the message about Upcoming Songs. I mean, what is an upcoming song? How does iTunes decide it's upcoming?
    Regards,
    spriter

    Upcoming Songs are tracks in Party Shuffle that have not yet been played. You can set how many upcoming songs are visible, but this setting does not determine how many upcoming songs there are.
    Party Shuffle is like selecting Shuffle for the Library or any playlist except that you can alter the results. You can add or delete tracks and you can manually reorder the upcoming tracks in Party Shuffle. You can also tell Party Shuffle to play higher rated songs more often.
    Regular shuffle stops once every track in the playlist has been played, but Party Shuffle will continue playing, adding repeat tracks when needed.

  • How does BDB update its secondary index?

    I am asking how does Berkeley DB update its secondary index?
    For example, in a BDB table with key value pair ``<k,v1>``, the index database would have reversed pair like ``<v1,k>``. Upon an insert (or essentially an update) ``<k,v2>``, base table record ``<k,v1>`` should be overwritten to ``<k,v2>``.
    But how would BDB deal with ``<v1,k>`` in the index table? Will it delete it immediately?

    Hi,
    As long as you correctly open the primary database and secondary index database, and associate the secondary index database with the primary, any update on the primary database will be reflected in the secondary index.
    For more information, please refer to Reference Guide for Berkeley DB -> Chapter 3.  Access Method Operations -> Secondary Indexes section.
    Regards,
    Cindy Zeng

  • How does EWA determines...?

    Hello my friends!
    I would appreciate your help with the following question.
    How does the EWA report determines the following values, that means what does it check from the monitored system to get
    values for the following:
    - Avg. Availability per week
    - Avg. DB request time in dialog task
    - Avg. DB request time in updated task
    Thanks in advance and best regards.

    Hi,
    - Avg. Availability per week
    I'm not sure, but I think this is from the availability file stored in work directory of the instance. It is not using CCMSPING or other CCMS functions, this is why availability in EWA is often not correct (e.g. if you have a network failure). Also not sure, but I think the KPI Report within solman uses CCMSPING for availability.
    - Avg. DB request time in dialog task
    From workload stats - same value as in transaction st03n
    - Avg. DB request time in updated task
    From workload stats - same value as in transaction st03n
    Regards,
    Frank

  • How does iMatch determine when to "match" and when to upload?

    Does anyone know how iTunes Match determines a match?
    I have songs purchased from non-iTunes sources and, even though they are available in iTunes, iMatch is uploading them instead of "matching" them. Any idea why? Is there something I can change in the song info to make them match? Genre maybe? The artist, album, and song names match as best as I can determine, but maybe iTunes Match is expecting them to be slightly different, like capitalization differences or something? Anyone know?

    I'm very interested in this as well. I have dozens of ripped CDs that are also available on iTunes, but they didn't match. In some cases, it was one or two songs. In others, it was the whole album. For example, Beggars Banquest by the Rolling Stones did not get matches. U2's War was mostly matched, but a couple of songs were not. "Drowning Man" from War is 4:15 on the CD but 4:14 on iTunes. Is it as simple as that? I would think Match would work more from a signature (like the app Stanza) versus length and such. Those are too easy to get wrong.

  • How does processScope restore its state?

    Hi, when a process returns, the process scope is supposed to return to its original state. How does it do that? is it a deep copy? How does it handle mutable objects?
    also, how does the process scope work with the back button?

    anyone?

Maybe you are looking for

  • Minimize issue with Lion

    I can no longer zoom, minimize or click out of my mailbox.  The three little icons normally at the top left of every window are missing.  Is there a fix for this?

  • Feed not submitting

    My feed is valid, but no matter how many times I submit the feed to iTunes it will not work. I don't get an email and I can try to re-submit it as many times as I want with no results. I have tried changing my 'tilte' and 'link' field but this isn't

  • Opening a CS5 file in CC (was: Help!!!)

    Hi i'm only after purchasing flash for my laptop, as i'm doing a project in college, this flash seems to be the new version and I saved my work that I did at home and on the Imac in college wouldn't let me open up the file as it wasn't CS5, I tried s

  • Coherence MasterMemberSet autoIncrement after updating a running EAR file

    Hi All, I have a EAR application file, which uses coherence 3.6.0.4. We have a requirement to deploy a new version of application, with out down time and hence "update" feature of EAR deployment. When we deploy the new application by selecting the ne

  • Can I connect my iphone to a computer monitor?

    Can I connect my iphone to a computer monitor and use apps like Garage Band on a bigger screen with the help of a mouse and a keyboard?