JScrollPane will not appear

I'm trying to add a scroll bar to a JTextArea. The textarea appears but there is no scroll bar.
Here's what I'm doing. I've included the whole class in case there is something relevant that I don't realise. Any ideas on what I'm doing wrong?
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Basic extends JFrame
JTextArea output;
     public Basic()
          super( "Diagram" );
          setSize( 800, 600 );
          Container c = getContentPane();
          JMenuBar bar = new JMenuBar();          
          JMenu fileMenu = new JMenu( "File" );
          JMenuItem n = new JMenuItem( "New" );
          JMenuItem open = new JMenuItem( "Open" );
          JMenuItem close = new JMenuItem( "Close" );
          JMenuItem save = new JMenuItem( "Save" );
          JMenuItem create = new JMenuItem( "Create Diagram" );     
          fileMenu.add(n);
          fileMenu.add(open);
          fileMenu.add(close);
          fileMenu.add(save);
          fileMenu.add(create);
          bar.add(fileMenu);
          output = new JTextArea();
          JScrollPane scroll = new JScrollPane(output);
          n.addActionListener(
               new ActionListener()
               {public void actionPerformed( ActionEvent e)
                    OpenUI o = new OpenUI();
                    TokenTest t = new TokenTest(o.fileText, output);
          c.add(bar, BorderLayout.NORTH);
          c.add(scroll);
          show();          
}

Use the methods SetVerticalScrollbarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS) and
SetHorizontalScrollbarPolicy(HORIZONTAl_SCROLLBAR_ALWAYS) so the scrollbars will appear whether they are needed or not.
OR
use new JTextArea(40,100) to set the minimum rows and columns of the textarea.

Similar Messages

  • I upgraded to iTunes 11.0. My iPod Nano 4th Version will sync, but music and playlists will not appear to manage and add more songs. Is there a fix?

    I upgraded to iTunes 11.0. My iPod Nano 4th Version will sync, but music and playlists will not appear to manage and add more songs. Is there a fix?

    If I go from 'Devices' to Summary and then Music, I only get one option-Sync Music,There is a box on this page but the options within it are grayed out. If I tick the Sync Music option I get this message-
    'Are you sure you want to remove existing music,films,ect, from this ipod and sync with this itunes library?
    'Music synced to (my ipods name) from other itunes libraries will be removed and items will be synced from this itunes library' I have only ever used itunes on this PC and the 'Manually manage music and videos' is ticked but
    that must be a default setting as I haven't ticked it.

  • TS3212 I am trying to install itunes on my pc and the run window will not appear. I changed the pop-up blocker settings and I still can't see it?

    I am trying to install itunes for my pc and the run window will not come up and I have changed my pop-up blocker settings and it still will not appear.....help?

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/quicktime/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • I have an Iphone 4, I have music files that appear on my phone that I want to delete, when I link it to my computer the songs on the phone will not appear in Itunes so I can delete them, Is there any way to delete these song off the phone without going th

    I have an Iphone 4, I have music files that appear on my phone that I want to delete, when I link it to my computer the songs on the phone will not appear in Itunes so I can delete them, Is there any way to delete these song off the phone without going through Itunes?

    Nope, it either needs to be plugged in or turned on with the power button.
    A replacement iPhone 4 is $149, but at least the whole phone is replaced.

  • I have CC and while attempting Light Effects, the Layer will appear in the layers panel, but the option bar will not appear and neither will the Properties panel. All my preferences are set correct, and my computer has a compatible video card and RAM. Ple

    I have CC and while attempting Light Effects, the Light Effects Layer will appear in the layers panel, but the option bar will not appear and neither will the Properties panel. All my preferences are set correct, and my computer has a compatible video card and RAM. Please help!
    I tried to delete the layer attempt again. I am in a Photoshop class, but the work is all online, so all my teacher is going to do is send me to this site. I am trying to edit a photo for this class, and without this working, i go to filter>render>light effects. the bar and panel will pop up for about 2 seconds, then disappear. How do i get the options bar and properties panel to display?

    I was about to suggest resetting LE from the Workspace drop-down top right corner, but if you can't see the Options Bar, I guess that is not going to happen.  The normal Tool reset is grey out for LE, so it might be a case of resetting Preferences.
    Reset Preferences
    Windows — Hold down Shift Ctrl Alt immediately after starting Photoshop
    Mac — Hold down Shift Cmd Opt immediately after starting Photoshop

  • HT201272 A lot of my songs, once put on the iCloud, will not download to my iPod.  They are on my iTunes, already downloaded, but will not appear in my library on my iPod.  Before I started using iCloud, all music in my iTunes library was on my iPod.

    A lot of my songs, once put on the iCloud, will not download to my iPod.  They are in my iTunes library, already downloaded, but will not appear in my library on my iPod.  There is no common thread for the origin of the songs--many were ripped from CD's, others purchased in the iTunes store.  Before I started using iCloud, all music in my iTunes library was on my iPod without any issues.

    - Are you saying that they are not listed in your Purchased section?
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    - Are they listed in your Puchases history when you log into your account on your computer?
    - Are they still available now for purchase? If not then you are out of luck
    If they are still available and listed in your Puchase History then contact iTunes
    http://www.apple.com/support/itunes/

  • Timing of text box will not appear.  My text boxes stop working on slide 5 and they will not work for the remainder of the slide show.

    Timing of text box not working.  I get the first few slides to work and then on slide 5 my text boxes will not appear.  And they do not appear for the rest of the slide show.   Help anyone.

    Text caption is timed to appear at 2 seconds, but you have a click box at 0sec. Its duration is very short, which means that I cannot see if there is a pause. I suspect this click box is pausing at the end of its timeline, which is at 0.3secs and the Text caption at 2 seconds will not appear before the user has clicked on that click box. The timeline is the core of Captivate, learn at least how to read it.
    Tiny Timeline Tidbits - Captivate blog
    If you want the green text caption 'Click on...' to appear right at the beginning of the slide, you have to check its Timing accordion: set it to start at 0 secs instead of 2 secs and extend its duration to the 'rest of the slide'.
    I don't know what is in the Group. That group and the HIghlight box will disappear at 3 seconds. Or maybe the action that is triggered by the Clickbox is different from 'Continue'?
    Lilybiri

  • Can't edit audio line - it will not appear

    For some reason my edit line will not appear in the audio track. I can't fade down or out the audio tracks downloaded from my iTunes library.
    Note: This is just one of the problems I've had since installing iLife 08. I did not care for '08 and deleted it but I believe parts of it still lingers somewhere.
    I will only use my version 6, but can't go further with four 'in progress' movies.
    Harold

    Phone EE to delete you old a/c. Then you will be able to create your new 1. Stupid, innit? They can't do this auto when you upgrade.

  • Icons will not appear on desktop

    hi there
    got a new 27 inch mac and icons will not appear on destop for example icon of a flash drive i put in, its on the left of the finder window but not on desktop as all my past mac have. Also downloaded drop box and that icon is not showing up as it should there to drag into applications folder. Im sure its a simple setting but I just cant find it!
    Thanks

    On Finder's menubar,  Finder > Preferences > General tab > select internal and external disks.

  • An orphan photo will not appear in "All Images"

    I have one picture in a project that does not show up when I go to "All Images" in the Library. I "imported" this picture from my desktop "Into the Aperture Library" but it did not show up in the Library.
    Why doesn't it appear in "All Images"? All other images appear there.
    Thank you for any help.

    I should have said Smart Album.
    If you control click on the library icon you will be able to select New > Smart Album. With that you can select all images (ie no filtering). That should show your missing image.
    Is the date correct on your missing image? If the date is wrong, it will not appear where you expect it to. See here for some information on smart albums:
    http://www.bagelturf.com/aparticles/library/smarta/

  • My adp payroll statement will not appear for me to view. How can I fix this?

    My adp payroll statement will not appear to read. Just a small square box with an x. How can I view it?

    Welcome to the Adobe Forums.
    To better assist you with this issue we need to know:
    What is your operating system? (Windows or Mac) (XP, Vista, 7, 8)
    What browser do you use? (Internet Explorer, Firefox, Chrome, Opera, Safari)

  • TS1591 iPad will not appear in Itunes

    My iPad 2 will not appear in Itunes. I have looked at other apple support pages and no of them have worked for me. It shows that the iPad is charging when I plug it into the computer but it will not show in Itunes.

    I had the same problem -- here is what I did to fix it:
    I turned my phone off and turned off iTunes. I then turned my phone on and then connected the phone to the computer. It automatically launched iTunes and showed up under the devices.
    Hope this helps!

  • "Non rectangular objects will not appear correctly when exported using CSS."

    I am using Ind CC 2014 exporting a document to a reflowable epub.  The document contains an .ai image.  The image exports correctly in some parts of the.epub but not others, where it is distorted. There is a warning on export :"Non rectangular objects will not appear correctly when exported using CSS."  Any suggestions appreciated.

    Thanks!
    >
          "Non rectangular objects will not appear correctly when exported
          using CSS."
    created by pooja2087 <https://forums.adobe.com/people/pooja2087> in
    /InDesign EPUB/ - View the full discussion
    <https://forums.adobe.com/message/6886892#6886892>

  • Kobo will not appear on Bookshelf

    I need help, my Kobo will not appear in the Bookshelf (Adobe Digital Editions), have tried everything!!

    What version of iPhoto are you using?  With iPhoto 9 the keywords were moved from under the thumbnails into the Info tray at the right when you type Command+i.
    OT

  • Images will not appear on Stage area of Adobe Flash Professional

    I have Adobe Flash Professional CS5.
    Yesterday I successfully created an animation.
    Later the same day I tried to create another and the images will not appear on the stage.
    I loaded in PNG files - which worked the first time - now they will not show up.
    I can see their binding boxes on the stage, and move those but the images just do not show up.
    When I hit ctrl + enter to preview, I can see the images in the preview movie - just not on the stage working area!
    I tried restarting, shutting down, updating my PC, uninstalling programs, loading different file types (jpg), and resaving and reloading the PNG files. I even tried different types of Flash defaults. NOTHING WORKS.
    I hope someone can tell me what is wrong this makes no sense!

    Before you drag the image from the library to your stage, make sure you insert a blank keyframe (F6) on the layer you are working with, then drag to stage. This worked for me.

Maybe you are looking for

  • Need help with Backup Recovery using Rman - Point in Time.

    Hi all, I am trying to recover my database to a certain point in time. Here are the details below. Oracle database version is. 11G R1. on 2 Node RAC. OS is AIX. Database name is Sales. Due to a mistake by the Application team, the database is written

  • Problem with text variable on 0CALMONTH2

    Hello, When I try to use a text variable based on 0CALMONT2, only 3 first caracters are displayed instead on the full text. Example : for september the system display SEP. How can I diplay all the text of the month ? Thanks in advance for your help.

  • Upgraded To Leopard Now itunes cant find iphone

    i upgraded to leopard and now itunes does nothing when i put mu iphone in the cradle? any help will do.

  • Unwanted sounds on ipad mini

    I am having unwanted alert sounds on my ipad mini. I have looked at every setting and still cannot find the one that is causing the alert. Help, I do not want to turn off all sound.

  • Mail Forwarding

    Greetings, I have recently configured a Leopard 10.5.1 Mail Server, which is a new platform for me. I have finally gotten all mail services to work and am finishing up the installation. I have a client that uses a crackberry who wants his email both