How do you add a Vertical scrollbar to a JTextArea?

How do you add a Vertical scrollbar to a JTextArea? This is what I've tried so far but it hasn't worked. I got that off of someone asking a similiar question here.
aTextArea = new JTextArea(10, 40);
         JScrollPane scrollPane = new JScrollPane(aTextArea);
         aTextArea.setText( " " );

JScrollPane(component)
this constructor will only show the scrollbar (vertical and/or horizontal) as needed..so, if the scrollpane viewport is larger than the component, then it will not show the scrollbar.
you can force the scrollbar to alway show
setHorizontalScrollBarPolicy(int policy)
setVerticalScrollBarPolicy(int policy)

Similar Messages

  • How Do You Add Multiple CSS Rules to Text?

    Hi everyone, I have these css rules in my css styles window they are all assigned to some text in a cell on my page.
    .Def14grey4 <body>
    .def14grey4 a:link <a>
    .def14grey4 a:visited <a>
    .def14grey4 a:hover <a>
    .def14grey4 a:active <a>
    .def14grey4 a:focus <a>
    How do you add (all of) these styles to the text in the first place, I know how to add the first one (.Def14grey4), you select the text in the cell and choose the rule from the drop-down menu in the css panel, but how do you add the other ones to some text as well, so that it can have the same link properties.
    Basically I have some more text elsewhere on the page and want to assign these rules to that as well.
    thanks Gareth

    You would want to change your order as shown here -
    .Def14grey4 <body>
    .def14grey4 a:link <a>
    .def14grey4 a:visited <a>
    .def14grey4 a:hover, .def14grey4 a:focus <a>
    .def14grey4 a:active <a>
    That way, the hover and the focus states are equivalent.
    How do you add (all of) these styles to the text in the first place, I know how to add the first one
    You don't really.  The 4 bottom selectors say -
    "find an element with a class of 'def14grey4', and style any link inside that element this way"
    So, <span class="def14grey4"><a href="whatever.html">Whatever</a></span> would get the pseudo-class styles, as would any of the following -
    <span class="def14grey4"><a href="whatever.html">Whatever</a></span>
    <td class="def14grey4"><a href="whatever.html">Whatever</a></td>
    <p class="def14grey4"><a href="whatever.html">Whatever</a></p>
    <body class="def14grey4"><a href="whatever.html">Whatever</a></body>
    <div class="def14grey4"><a href="whatever.html">Whatever</a></div>
    <strong class="def14grey4"><a href="whatever.html">Whatever</a></strong>
    and so on.  These examples assume that there isn't some other more specific rule that would apply to the same links.  You need to study up on the CSS cascade and specificity....

  • How do you add a google calendar to muse web site, that updates are synced

    how do you add a google calendar to muse web site, that updates are synced?

    You can add Google Calender using iframe which Google provides if you go to calender settings.
    Once you insert this code in Muse page through Object > Insert HTML , the calender will be displayed on page.
    https://support.google.com/calendar/answer/41207?hl=en
    Thanks,
    Sanjit

  • How do you add non-Garage band instruments into a Logic project so that you can hear them on playback?

    How do you add non-Garage band instruments (orchestral instruments) into a Logic Pro (8) project so that you can hear those insrtruments' sounds on playback?  I've tried to understand and follow the Logic Pro 8 User Manual, but the process comes off as so complex and the writing so technical that it does not help but only confuses.
    To be precise - I want to add instruments (orchestral) that are not offered in the current Garage band menu which is offered in the Mixer's channel strip menus for Logic Pro 8.  To be clear, the instruments that are offered are Bass / Drum Kits / Guitars / Mallets / Organs / Pianos and Keyboards / Synth Basics / Synth Leads / Synth Pads.  Most of these that I've tried seem to work and give their characteristic sound when placed in a particular channel and playback is clicked. 
    However - there is one orchestra instrument offered in the standard Logic Pro 8 Mixer channel menu and it's the item labelled "Performance - 000 flute 1 or 001 flute 1."  And it is this instrument that presents a problem. When I click on it and choose it from the menu and enter it as the instrument of choice for a specfic channel / track in my Logic Pro project arrangement, when playing back the music for the overall piece this particular track, the flute, does not playback and produce the notes (Midi events) in the track in the sound of the flute.  Instead, nothing comes out at all.  I can't imagine why this does not work.  Any ideas, anyone? Again, when choosing this instrument for a track and clicking the playback no flute sound is forthcoming.  Why not? I have not tried them all, but when most of the other various types of keyboards, such as an electric piano or an organ, are chosen for a track the playback successfully renders the sound of these instruments.  Why then does playback not produce the sound of the flute when it has clearly been chosen to play and sound the Midi events given it?
    Anyway, the overall, larger issue for me is the inability I have to choose and get non-Garageband instruments (largely orchestral) to play the Midi events given on various tracks. If my guess is correct then technically, orchestral instruments not offered in the standard Logic Pro 8 Garageband Mixer channel menu are referred to as external Midi sampled instruments - still, IMHO the process is not clearly spelled out in the User Manual.  The simple step by step process whereby a non-Garage band instrument, say an orchestral instrument, is placed in a channel replete with Midi event (notes) waiting to be played should be easy, logical and given in a simple to follow format, but is not.
    What with all the talk of routes, busses, auxillary channels, GM devices, GM mixers, audio bins, libraries and audio files this Logic Pro User is confused to the max.  Can someone please help me and, in simple English, describe the step by step process whereby presumably external sampled orchestral instruments can be successfully employed, in any given Logic Pro arrangement project, to render their characteristic sounds upon playback?
    On my two Macs, one a laptop and one a much larger Mac, I have any number of the GSO (Garritan Symphony Orceshtra) and Vienna Symphony Orchestra instrument library samples - and yet - I've yet to figure out how to actually get them INTO a Logic Pro project of any kind!  To put this as a question, even as a humble request, how can I make good use of these orchestral sample libraries in a Logic Pro project?  Can someone steer my to a clear resolution of this issue.  I'd sincerely appreciate it!  Thanks all! 
    DavidBacon

    DavidBacon wrote:
    Anyway, the overall, larger issue for me is the inability I have to choose and get non-Garageband instruments (largely orchestral) to play the Midi events given on various tracks. If my guess is correct then technically, orchestral instruments not offered in the standard Logic Pro 8 Garageband Mixer channel menu are referred to as external Midi sampled instruments - still, IMHO the process is not clearly spelled out in the User Manual.  The simple step by step process whereby a non-Garage band instrument, say an orchestral instrument, is placed in a channel replete with Midi event (notes) waiting to be played should be easy, logical and given in a simple to follow format, but is not.
    What with all the talk of routes, busses, auxillary channels, GM devices, GM mixers, audio bins, libraries and audio files this Logic Pro User is confused to the max.
    David,  you understand that this is professional software and is not necessarily meant to be easy but is in fact designed to give the professional user as many choices as possible, that's why it's in the Pro Apps section. You WILL need to learn about buses, GM Devices, Audio Bins, Libraries...etc..etc if you intend to use Logic.
    That said, you are looking in the wrong place in the channel strip.
      May I offer you advice?
    Go here:
    http://documentation.apple.com/en/logicpro/
    Open "Exploring Logic Pro"  (a short PDF Document). Pay special attention to chapter 3. Also pay special attention to the included graphics of the channel strips.
    I encourage you to read the whole document as it will clear up many things... even though it's a Logic 9 document.
    Post back

  • How do you add an iTunes Gift Card & how is it charged?

    Hey all,
    I currently pay for my iTunes downloads direct from my Debit Card. If I add a gift card to my account will the cost of downloads come from that automatically or do I need to let iTunes know thats what I want?
    Also - how do you add the card? I'm probably being totally stupid but can't seem to find an "add credit here" option.
    Help appreciated

    If you redeem an iTunes gift card, the next purchases you make up to the value of the gift card will be made from it automatically. To add the card, click here; this link will open iTunes.
    (34512)

  • How do you add multiple iTunes to Keynote

    How do you add multiple songs from the iTunes to your Keynote presentation?

    Jer&Renee,
    welcome to Apple Discussions.
    It depends where you want them in your presentation.
    Open the Media inspector and choose a playlist. In the list of entries, mark those you want to add to Keynote (use command-click to mark multiple titles not in one block).
    Then drag the marked titles either on a slide or on the small Audio field (looks like a frame) in Document inspector. When you then hover the cursor at the Audio "frame", you'll see the quick info "Multiple Files". You cannot change the order or remove one of the files, but only all of them.

  • How do you add pictures to your photo book after saving it? Can you re-save it to send to blurb?

    How do you add pictures to your photo book once you have saved it? Moreover, can you save it again and send it to Blurb.

    Go back to Library and drag the extra photos into the book collection.

  • How do you add multiple users to an itunes account

    how do you add multiple users to an itunes account

    First :
    Using an iPhone without a wireless service plan
    Then restore the iPod to factory settings/new iPod on the computer your kids will use:
    iTunes: Restoring iOS software
    If you are using the same computer
    How to use multiple iPods, iPads, or iPhones with one computer

  • How do you add adobe flash player to your mac computer

    How do you add adobe flash player on a mac computer so you can watch youtube and or listen to music?

    Click here and download it.
    (119142)

  • How do you add the ipad device to your itunes account? Please!!

    How do you add the ipad 2 device to your itunes account

    There is no need to add the iPad, just sign into your iTunes account when you need to.

  • How do you add visual video controls to widget video in ibooks author?

    How do you add video controls to video using ibooks author?

    I have the same question as VideoImage. I would like the controls to appear in some of my videos so that the reader can speed them up or slow them down. This would save me having to run them through iMovie at 4X say and saving them that way. As far as I can see, the video fast forward, fast reverse, go to end, go to beginning controls only appear in the Widget inspector. What is their purpose then? 

  • How do you add a video clip to a slide show?

    How do you add a video clip to a slide show using elements 12?

    You can import some very short video clips into Photoshop and make gifs.  I can import short (10 second or so) .mvi video clips I've taken with my point and shoot camera.
    Use File ->Import->Video Frames to Layers
    CS3 doesn't recognize .mvi files until you enter *.* in the box, hit load, then find the file you want.
    After the file has been loaded, go to Windows, and check Animation.
    After the Animation bar loads, go to the right side arrow, check Make Frames from Layers.
    Then Save for Web and Devices, and you've got your gif.
    I find it much easier to use the separate software.

  • How do you add a new thumbnail to a slide show when using in-browser editing?

    how do you add a new thumbnail to a slide show when using in-browser editing?

    At this moment you can’t add pictures to a slideshow. You only can replace them.

  • How do you add a Christmas frame to an image in Elements 10?

    How do you add a Christmas frame to an image in Elements 10?

    In PSE 10, go to Full Edit mode. 
    Open your image.
    Open the Content panel.
    In the first dropdown choose "By Event".
    In the second dropdown choose Christmas.

  • How do you add an application event to the Applications Panel

    How do you add an application event to the Applications Panel.
    My previous post referred to .ashx files, and the problem seems that Firefox, by default, does not recognize a .ashx format being read by Adobe Acrobat.
    Therefore there needs to be a way to add Applications and Events into the Applications Panel under Preferences

    domdp wrote:
    ...I have Theme L selected and I get 10 icons along the left side and bottom....
    ...I am thinking I may be limited to 10 icons....
    Gotcha... But actually its limited to 9 icons in the L theme as the Profiles icon is always present. From that screen hit the Menu key to display the bigger list of icons. Arange them so the first 9 icons are the ones you want to see on the L theme.

Maybe you are looking for

  • Appearance and Length of Lines in E-Mail and elsewhere

    I'm using a MacMini OS 10.2.9. Everything was great, then on start-up all was different. My Desktop picture had disappeared, everything was in purple etc. My e-mails have long line length and I am unable to shorten. Have looked at preferences etc. an

  • How do I get my screen to be a full screen?

    There are these margins on both sides of my screen, so its like my computer shrunk 2 inches!

  • Custom Scheduling

    I am asking my question prematurely as the business requirement is fluid at the moment. The need here is to schedule reports based on the last business day of the week. If the end of month fall mid-week, then the report should run on that day too. My

  • Kp06 recording

    hi experts,     can any one explain how to record tcode kp06?     how handle table control ?

  • How do i get my FaceTime to work when it will not use my Apple ID?

    ive been trying to access my FaceTime acount using my Apple ID, but when i went to sign in it did not recognize or accept my account. does anyone know why?