How do I set the number of columns for JTextPane

I only found a method setSize() of JTextPane class. How can I set the number of columns in a JTextPane? Each column can be written one letter.
Thanks.

You're not going to use FontMetrics to change the width of the characters; you're going to use it figure out how wide a single character is. Then multiply by the number of characters you want to have in a line, and presto! You know how wide to make your JTextPane.
Unless I've misunderstood your problem, of course.

Similar Messages

  • How do i change the number of columns within a text box?  I need to go from three columns to one.

    How do I change the number of columns within a text box?  I need to go from 3 columns to 1.  The insert column is highlighted and column break does not work for this.

    Pages '09 does not seem to allow layout breaks in Textboxes.
    Pages 5.2 has the same limitation.
    Use multiple linked Textboxes in Pages '09 to get the layout you want or create your layout in a Word Processing template in the document layer.
    Peter

  • How do you set the number of rows in a spreadsheet, so that even when you drag data in, in writes over those rows instead of adding a new row?

    How do you set the number of rows you want in a spreadsheet, so that even when you drag data in, in writes over those rows instead of adding a new row?

    After the discovery reported above, I filed this report :
    Bug ID# 10073038
    Summary:
    When Numbers is used on a system with decimal comma a csv file may be good AND wrong
    Steps to Reproduce:
    With Numbers v2, you introduced an interesting enhancement.
    In system using the comma as decimal separator, Numbers requires csv files using the semi-colon as values delimiter.
    In fact it’s true if we OPEN the document dragging its icon on Numbers one or thru the open dialog.
    This said.
    (1) Drag and drop a csv built with the 'semi-colon' standard on a table or on a sheet
    (2) Drag and drop a csv built with the 'comma' standard on a table or on a sheet
    Expected Results:
    Every normally constituted user assume that in
    case (1) he will get a perfectly built table
    case (2) he will get every cells of a row in a single cell
    Actual Results:
    In fact you forgot the drag and drop way of use and in
    case (1) every values separated by semi-colon are inserted in a single cell
    case (2) values separated by comma are correctly spread in a table
    isn’t it ridiculous ?
    Regression:
    Except looking in  QuickView to see which is exactly the structure of the file to decide the way we will insert it in a Numbers document, we may use an applescript fair enough to replace the semi-colons by TAB characters
    or
    to replace the commas by TABs and the decimal periods by commas
    Notes:
    While I am on this subject, I wish to make two proposals:
    (1)  It would be fine to format the date according to the ISO format year-mm-dd when you export a Numbers doc to csv.
    Doing that, dates would be imported correctly in every countries.
    At this time, on an English system, you export as mm/dd/year.
    If the doc is open on a system using the format dd/mm/year, the results will be odd.
    On a system using the format dd/mm/year, you export this way and so, if the doc is open on a system using the format mm/dd/year the results are odd too.
    As every localized versions accept the ISO format (at least on entry), using it in the export scheme would give a correct behavior everywhere.
    (2) It would be fine to add the format Tab Separated Values in the Export pane.
    TSV + ISO date format would give documents opening flawlessly everywhere.
    Yvan KOENIG (VALLAURIS, France) dimanche 4 septembre 2011 21:27:41
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How can I set the number of test sockets in my program?

    How can I set the number of test sockets in my program? I use LabWindows/CVI  6 and TestStand version 2.0.
    And I use BatchModel for the parallel UUT running. I didn't found program way to set the number of test socket. I think I should have it. In TestStand I can change the number of test sockets through menu Configure -> Model Options -> number of test sockets (I mean I do it by manual mode).
    Thank's a lot.
    Maria

    One way you can set the number of Test Sockets for your sequence is by overiding the ModelOptions Callback used by your sequence. Select All Sequences from the View drop-down then right click, select Sequence File Callbacks, select the ModelOptions callback and then click on Add. You can then select the Edit button to Edit the ModelOptions for your sequence. You can set other ModelOptions as required also.
    RG

  • How can I set the number of rings before going to voicemail?

    Help please..... my phone rings more than 10+ times before rolling to voicemail. How do I set the number of rings I want? I am missing calls as callers will not wait through through so many rings to get to vm if I am unable to pick up the call. Thank you for any help you can give!

    You can't. Try contacting your phone carrier as they handle voicemails.

  • 8330 Call Forwarding​...How do I set the number of rings before calls are forwarded?

    8330 Call Forwarding...How do I set the number of rings before calls are forwarded? Right now it instantly forwards my calls but I don't want that. I want to change it so that let's say that if after 5 rings I don't answer the call is forwarded. I've looked everywhere for an answer but have had no luck. Any help would be appreciated. I am with Virgin Mobile if this makes a difference.
    Thank you 
    Message Edited by 8WDDdotcom on 08-01-2009 02:39 PM
    Message Edited by 8WDDdotcom on 08-01-2009 02:44 PM

    Well, call forwarding is a feature provided by your carrier -- it is not a function of the device. However it works for your carrier is how it works. Actually, from what I understand about call forwarding, it normally is an all-or-nothing circumstance...calls forward to the number you've asked them to be forwarded to, keeping you in a DND status. Regardless, though, if your carrier tells you how it works on their system, there's nothing that the device can do to override that. Unless there is some kind of 3rd party app that would do it, bypassing (somehow) the carrier network CF feature...but I've never heard of such a thing.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT4515 how do I set the number of rings before the caller goes to voice mail ?

    How do i set the number of rings before the coller goes to voice mail on my iphone?
    Thanks you.

    Determined by your carrier, so contact them.

  • How can I set the number of batch process for DTP globally?

    Hi guys,
    How can I set the number of batch process for DTP in system globally?
    For eg. set the number to 1
    Any hint is appriciated!
    Regards,
    Liying

    Hi,
    In DTP screen also you can view batch settings. Check the Settings menu, you will find Batch.
    Reg
    Pra

  • How to set the number of averages for doing octave analysis

    Hi
    I am using a 4472 DAQ for continuously acquiring time domain signal and doing octave band analysis using Sound and vibration tool kit. How can we set the number of averages while doing the Octave analysis. All  the other FFT vi like FRF, Auto Spectrum, Cross Spectrum have an option for setting the number of averages and then the vi runs for those many averages and it stops. How this same logic can be applied while doing octave analysis.
    Regards,
    Ankit

    Hi Ankit,
    You may want to consider using the VI in a for loop.  By wiring the "number of averages you wish to complete" to the count terminal ("N'), you can control how many times the VI runs.
    Hope this helps,
    Jennifer O.

  • How to set the number of rings for the agent phone rings before it get the not prepared state

    hi, how to set the number of rings for the agent phone rings?  before it get the not prepared state.
    thanks

    The following assumes that you are using ICM with an IPIVR etc (not using CVP), as the answer is different for CVP
    What you are looking for is called "Ring no answer time".  It is set in the Agent Desk Setting List tool.
    Regards,
    Kevin

  • How do I set the default welcome page for PUBLIC user

    gurus,
    i'm using -
    Oracle 9i Database
    Oracle 9ias Portal Release 2
    QUESTION => how do I set the default welcome page for the PUBLIC user.
    i did the following to achieve this -
    1. logged into portal
    2. clicked on builder
    3. clicked on administer tab
    4. selected PUBLIC user in the Portal User Profile portlet
    5. went to the preferences tab
    6. in the default home page selected a custom page group
    7. logged out of portal
    8. open a new browsere session
    9. type the portal URL and i get the login page ....??
    i'm unable to understand this behavior ... shouldn't i be getting the page group that i set for the PUBLIC user in step 6 above ....
    the second QUESTION is => when the user logs out he/she should see the PUBLIC page set in step 6 above ... but, instead the user sees a page that is as follows -
    Partner Application Name Logout Status [Logout Status]
    Oracle Portal (portal) logout status
    The SSO Server (orasso) checkmark
    buzz.resva.trw.com:7778 checkmark
    infrastructure.happy.resva.trw.com checkmark
    portal1.buzz.resva.trw.com checkmark
    portal2.sylvester.resva.trw.com checkmark
    sylvester.resva.trw.com:7778 checkmark
    so, how can i set the default page for the PUBLIC user and also a page when he user logs out.
    ideas anyone ....?
    thanx a bunch.
    hero

    Hi,
    The sequence of operation you are doing to set the home page for public users is correct. You are getting the login screen as the "custom page group" selected as "home page" has not been granted to public.
    Also, while logging-out, it is normal behaviour to get the screen where it shows the list of partner applications from where user has been logged-out. When you click on "Return" button, you will get to the "home page" set above.
    Hope it clarifies the things.
    Regards,
    Ved

  • How to find out the Number range object for Incident number

    How to find out the Number range object for Incident number ?
    CCIHT_IAL-IALID
    regards,
    lavanya

    HI, an example.
    data: vl_num type i,
          vl_char(6) type c,
          vl_qty type INRI-QUANTITY,
          vl_rc type INRI-RETURNCODE.
    CALL FUNCTION 'NUMBER_GET_NEXT'
      EXPORTING
        NR_RANGE_NR                   = '01'
        OBJECT                        = 'ZRG0000001'
       QUANTITY                       = '1'
      SUBOBJECT                     = ' '
      TOYEAR                        = '0000'
      IGNORE_BUFFER                 = ' '
    IMPORTING
       NUMBER                        = vl_num
       QUANTITY                      = vl_qty
       RETURNCODE                    = vl_rc
    EXCEPTIONS
       INTERVAL_NOT_FOUND            = 1
       NUMBER_RANGE_NOT_INTERN       = 2
       OBJECT_NOT_FOUND              = 3
       QUANTITY_IS_0                 = 4
       QUANTITY_IS_NOT_1             = 5
       INTERVAL_OVERFLOW             = 6
       BUFFER_OVERFLOW               = 7
       OTHERS                        = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    vl_char = vl_num.
    write vl_char.
    Regard

  • How do I set the default print margins for ALL printers in mozilla.cfg

    How do I set the default print margins for ALL printers in mozilla.cfg, even ones that are not yet installed / connected to the computer?
    I'm trying to install firefox with MDT and apply certain print options, but the printers themselves are connected at a later stage so the print.printer_myprinterhere cannot be used.

    Best answer I could find: [https://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/#comment-132668]
    If you can figure out how to add the printer name, this can be used to lock the margins.

  • How to set the number of sockets for batch processing at runtime?

    Hello all,
    I need to change the execution model at runtime. I have achieved this by setting the 'ModelPath' property of the sequence file at runtime. When I set the sequence file model as batchmodel, i need to set the number of test sockets also dynamically. How can this be done? Once i set the number of sockets, i would also have to set the UUT serial number for each socket. Please help me out in solving this.
    Thanks and Regards
    Madhu Srinivasan.

    Hi Madhu,
        You can do this by inserting a sequence file callback into your main sequence and choose the ModelOptions callback. You can then use the expression step to set the "Parameters.ModelOptions.NumTestSockets" value to whatever you want. If you then use the Test UUTs execution entry point you will be prompted for serial numbers automatically. You could also use this same procedure but alter the ModelOptions callback in the process model directly, either way works just as well but I think that using a sequence file callback gives a bit more flexibility in the system.
    Hope this helps,
       Nick

  • How do I set the CoreTable sort column in the managed bean?

    I have a CoreTable with two columns, first name and company, from the managed bean in a session scope, how do I set the company column to be the default/selected sort order?
    Or is that done by binding the af:column to a CoreColumn object in the managed bean, which method would I use?
    <af:column sortProperty="company" sortable="true">
    <f:facet name="header">
    <af:outputText value="#{common.labelCompany}"/>
    </f:facet>
    <af:outputText value="#{row.company}"/>
    </af:column>
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, I know, "sortable", see, I even used it in my example. I don't want to disable default sorting.
    What I'm asking is how to have more than one sortProperty. When the user clicks the column heading, I want to sort by "myFirstProperty" AND "mySecondProperty". The sortProperty only seems to allow one sort property.
    One possibility seems to be to programatically add items to the List of SortCriterion objects as in your example, but where would I put this code so that it is executed when the user clicks the column heading, but before the table is sorted.

Maybe you are looking for

  • "no data found" message wrapping in interactive report

    I've looked around and can't figure out what's going on. Any help would be greatly appreciated. I have an interactive report which, when no data is found, displays the "no data found" message wrapping very tight. I have uploaded a screenshot of it to

  • Merge field won't display if number is 0.00

    When the value 0.00 is brought into the word document via merge field, nothing displays.  If the value is greater than 0.00, it displays that value.  Is there way to display the 0.00?

  • Retaining rating for images after PS edit

    In LR2, I could rate my images in LR, edit in PS and once done, they reappeared in LR, complete with the rating of the original image.  In LR3, once edited and returned to LR, they lose their rating.  I find this very frustrating as I have to undo th

  • Converted home videos to itunes not working with ipod touch

    So I finally was able to convert some home movies to itunes but now they will not work with my ipod touch. I get a error message saying "can not be played on this ipod". I also can't get the movies to work with my ipod video (classic) either, how do

  • Mbp 2011 screen freezes and beeps

    My 2011 MBP 13.3 will freeze, displaying short bars across the screen in columns, audio beeps three times in intervals.  I must hold the power button down to reboot.