Trouble using scroll panel in textArea

Hello all,
Im kinda stuck again I'm having a small simple problem where I'm reading the results of a search performed from a .txt file and I'm returning the results to a textArea but the only problem is that the textArea will not create a scroll bar when it is needed and i was wondering if anybody could help
public Container create_mainPanel()
//This creates the main panel that will hold the other panel
//that is used in this program
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
//create JPanels
panel = new JPanel();
panel.setLayout(new BorderLayout());
textArea_panel = new JPanel();
textArea_panel.setLayout(new BorderLayout());
exit_button_panel = new JPanel();
exit_button_panel.setLayout(new BorderLayout());
//The grid layout is used to make a row with 2 buttons across and a column
panel.setLayout(new GridLayout(1 , 1));
search_field = new JTextField(20);
search_field.addActionListener(this);
textArea = new JTextArea(20 , 50);
scroll_panel = new JScrollPane(textArea , JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scroll_panel.setBorder(BorderFactory.createEmptyBorder(0,20,10,20));
textArea.setEditable(false);
textArea_panel.add(textArea);
textArea_panel.setBorder(BorderFactory.createEmptyBorder(10 , 20 , 10 , 20));
//Create a search button that will connect to the Google Web site and performs
//a search on the behalf of the user and returns it in XML
JButton search_button = new JButton("Search the web...");
panel.add(search_button);
panel.add(search_field);
panel.setBorder(BorderFactory.createEmptyBorder(10 , 20 , 10 , 20));
//Creates a button that can be used to exit the applet
exit_button = new JButton("Exit");
//creates a button that can be used to display the results in the text area
display_button = new JButton("Display results on text area");
//adds the display_results button to the exit_button_panel
exit_button_panel.add(display_button);
//adds the Exit button to the exit_button_panel
exit_button_panel.add(exit_button);
exit_button_panel.setLayout(new GridLayout(0 , 1));
search_button.addActionListener(new search_button_listener());
exit_button.addActionListener(new exit_button_listener());
display_button.addActionListener(new display_button_listener());
//This code is used to specify where the panels should be put to be
//displayed on the main panel
//West is the left hand side, East is the right hand side,
//South is the bottom of the page, and North is the top of the page
mainPanel.add("North" , panel);
mainPanel.add("Center" , scroll_panel);
mainPanel.add("Center" , textArea_panel);
mainPanel.add("South" , exit_button_panel);
mainPanel.setBorder(BorderFactory.createEmptyBorder(10 , 10 , 10 , 10));
return mainPanel;
} //End of public Applet2()
Rgds,
Tony
[email protected]

I don't understand why you add textArea twice to mainPanel?
1. scroll_panel = new JScrollPane(textArea , JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
mainPanel.add("Center" , scroll_panel);2.textArea_panel.add(textArea);
mainPanel.add("Center" , textArea_panel);

Similar Messages

  • Using Scroll Panel

    Hello everyone!!
    I try to work with scroll panel putting some text on it.What
    I did is creating one swf file that contains the text and in
    another swf I put the scroll panel.The problem is that I cannot see
    the whole text I wrote and when the scroller is at the middle my
    text is cut.
    You can check what I mean on www.apositive.com in the news
    section
    I am using flash 8
    Thanks in advance!!

    quote:
    Originally posted by:
    fojool-br
    If quilting stitch is like that one of http: //
    www.apositive.gr new you to create a field of dynamic text and to
    put a name in instance name, drag the component UIScrollBar up to
    pulling in on the field of text, see in the properties of the
    ScrolBar that he will be going to catch the name of the field of
    text if he links if it will adjust to the size of the field of text
    this one done it is enough to put his text inside the field of text
    Thanks
    I tried that but I couldn't maintain the format of the text I
    already have.I mean make it a dynamic text it colors all the fonts
    the same and puts the same font everywhere

  • How do I select a cell in a multicolum​n list box and use scroll horizontal on th

    From an event structure, how do I select a cell in a multicolumn list box and use scroll horizontal on the front panel at the same time.  I can select a cell from the multicolumn in an event structure, but I cannot move the scroll bar on the front panel when the program is running.
    Solved!
    Go to Solution.

    I'm assuming you're referring to the scrollbar in the multicolumn listbox. What is your code doing when you select a cell? Can you please post your code so we can see the behavior you're describing? It's possible that you're blocking the event structure, as in performing some long operation in the event that's handling the cell selection. In this case the event structure has to wait until the event completes before being able to respond to the next event. You can configure the event to not lock the front panel while waiting for the event to complete.

  • FAQ: How do I create a scrolling panel in Flash Catalyst?

    A common challenge in web design is finding space in the available window to display all of the necessary content. One solution is to create scrolling panels. A panel creates a well-defined container for content in the user interface. By adding scrolling content and a scroll bar, you can place a large amount of information in a limited space. To create a scrolling panel in Flash Catalyst, you need:
    An object to define the panel area, such as a rectangle shape (optional)
    Scrolling content, such as a long block of text or a series of images (required)
    A scroll bar used to scroll the content (recommended)
    Follow these steps in Flash Catalyst Help to create a scrolling panel:
    Create a scroll panel component
    There are also video tutorials showing examples of different scrolling panels:
    Creating a scroll panel in Flash Catalyst, by Doug Winnie
    Create a scrolling text panel in Flash Catalyst, by Terry White

    Thank You, Thank You,
    Thaqnk You
    Allen D. Macfalda

  • Trouble with accordion panel

    I'm trying to put an accordion panel in a page of the website i'm creating but i've a weird problem.
    First of all, this is the link of the page
    http://wwwipiniriolotermeit01.businesscatalyst.com/menù.html
    As you can see, when i choose one of the option of the panel, the background begin to shake.
    Of course i've tried with other panels, included muse's widget but the results is the same.
    Can someone help me to resolve this issue?
    Thanks in advance.

    Thank you very much again.
    Last time i've uncheck only the element of the master page's footer not the
    entire "menu" page from the menù.
    Now, as you say, the jittering is disappear.
    Regards
    Luca
    2014-03-07 16:18 GMT+01:00 Aishvarya Raj Rastogi <[email protected]>:
        Re: Trouble with accordion panel  created by Aishvarya Raj Rastogi<http://forums.adobe.com/people/aishvarya+rastogi>in *Help
    with using Adobe Muse CC* - View the full discussion<http://forums.adobe.com/message/6188378#6188378

  • Integrated scroll panels and unmovable toggle buttons

    Hey,
    iam looking for an expert. I am working on an HMI development and wanted to use Flash Catalyst. However, I think I am already reached the limits of FC. But perhaps there is a FC solution because I can not program Flash.
    Problem:
    In my layer, I have different graphical objects and text blocks. A part of them I want to move with a scroll panel. That's easy, not a problem.
    However, all these objects (including the scroll panels) should be integrated in a master scroll panel. This means, that all parts, even the integrated scroll panels, should be moveable at the same time. I managed this.
    Now, I need multiple toggle buttons. With these Buttons I wanted to change the form of some of the graphical objects resp. the text blocks. But the buttons have to be unmovable. This function (to change the form of the objects) is relatively easy but in combination with the integrated scroll panels it isnt. The buttons are able to move the objects when these buttons are pasted in the "deepest" layer, the layer of the objects. But there, the buttons are moveable and slide out of the screen (with the master scroll panel) and not clickable.
    How can I manage this? I need unmovable toggle buttons, with these I want to change the forms of objects. The objects are pasted in integrated scroll panels. I hope it's understandable!
    Can someone help me? It would be glad if the answer does not depend on the learning of the flash programming!
    Thanks.

    After 2 days of banging my head against a wall (doesn't it always go that way)...
    Turns out one of my panels had sub-panels causing the problem. Visibility to the parent panel was controlled by a button on one of the child panels. Once I "promoted" the button to the parent panel, the panel (screen) flow worked great.
    Is this 'undocumented functionality'? Why should it matter how deep the button is nested? (incidentally, the reason it worked in my test environment was the lack of other components - aka the child panel)
    Well, regardless. Thanks to those who gave it thought.

  • "Zoom using scroll wheel while holding" is broken

    Hello,
    Since updating to Mac OS X 10.7 Lion this morning, the "Zoom using scroll wheel while holding" feature is broken.
    In the mouse control panel the checkbox for "Zoom using scroll wheel while holding" is definitely checked. The default Control ^ key is selected. I verified I'm hitting the correct key on the keyboard using the keyboard viewer.
    I've tried using this with 2 finger scrolling on my trackpack as well. I've also tried turning off most of the trackpack geustures.
    I tried searching these forums prior to posting and found replies telling people with various different situations to turn this feature off. I want it on. I use it constantly.
    I have a MacBook Pro Aluminum 13-Inch Mid 2010
    Processor  2.4 GHz Intel Core 2 Duo
    Memory  4 GB 1067 MHz DDR3
    Graphics  NVIDIA GeForce 320M 256 MB
    Software  Mac OS X Lion 10.7 (11A511)
    Any advise would be appreciated!
    Thanks.

    Hello. Original poster here. I can confirm a few things after observing for a few days and trying stuff.
    1) The Universal access fixes did nothing. I set & reset those settings til I was blue in the face.
    2) I tried a "Repair Permissions" with the Disk Utility. No luck.
    3) It works intermitently. After sleeping sometimes it works. After plugging into my external monitor sometimes it works on the external monitor but then if I unplug it won't work again. After a reboot somtimes it works, then after sleeping stops working. Kinda strange. When it works it works from both my external USB mouse and the trackpad, so I don't think it's the hardware.
    I don't have Time Machine configured - been using Carbonite, but they're not compatible with Lion so might have to get Time Machine running anyway - but it's not a fix per se, since this oughta work all the time.

  • Button interactions within Scroll Panel/Content

    I am creating a portfolio website using Flash Catalyst. On my Portfolio page I have a vertical scroll panel and within that panel I have little thumbnails of my artwork converted to a button component. So when the user click on the thumbnail I want the larger image to appear nearby. I make new states for the larger images within the scrolling content, but whenever I use the scroll thumb it also scroll the larger images that i want it to be in a fixed position. So is there anyway I can lock the larger image while user is able to scroll through the thumbnails. If not possible, is there anyway i can duplicate the events on the timeline from one page/state to another similar one?
    If there is a better way to accomplish this please let me know too, I am all ears. If you need clarification on my issue, I will try my best to explain it through texts.

    Hi,
    Here's a quick wireframe to illustrate the thumbnail separate from the detail image.   The large images could be in their own custom component or in different states in the main timeline (per this example).
    The scroll bar needs be edited to look nicer.
    Hope this helps.
    Tanya

  • Scroll panel easing?

    I have seen a few examples of creating a scroll panel in Illustrator/Photoshop and then making it functional in Catalyst but I am just curious, is there a way to add easing to the scroll in Catalyst? You know so it speeds up and/or slows down as you scroll?

    Thanks, you answered my main question of "can it be done in catalyst?" On one hand I was pretty sure you couldn't but on the other hand, designers like me think to themselves....why not? You can control the transition and easing of other states, why not this? In other words as Catalyst evolves, to me, it seems like having easing control over just about any animation or anything you interact with (such as a scroll panel) would be standard, keeping up with todays sites.
    I appreciate the extra step you went with giving me the code, but was hoping to not have to go there, especially since thats what catalyst was shooting for. I do use flash cs4, and use a combination of timeline animation and actionscript, but my actionscropt knowledge is VERY minor. I usually use snippets of code from other sources, and tweak it if I can. Usually taking me a long time to figure out how to tweak it to my needs.
    Again, thanks for the reply.

  • Updates to Folio Panel, Producer Tools and Content Viewer on iPad breaking scroll panels

    This has not been a good morning.
    Came into the office this morning, logged in and saw that there were updates for the Content Viewer, Producer Tools and the Folio Panel. Updated them all. Started to work some more on a promo piece for a new magazine and began to notice Scroll Panels using the "Pan Only" form within the Content Overlay panel no longer work. This was a great way to create scroll panels that could contain hyperlinks. Problem is, I am not sure where the problem lies. Is the problem with the Viewer or with the updates to the Folio Tools or Folio Panel? I am unfortunately on deadline for this afternoon and I don't have the luxury to troubleshoot this. Granted, I probably shouldn't have updated all of these tools at this juncture, but I was hoping that these updates would fix the problem I was having with the Desktop Viewer that wasn't working. Sadly, the Desktop Viewer works now, but that came with the price of losing functionality elsewhere.
    Frustrated.

    Yeah, it's been a project that I was working on for the last two weeks. We were supposed to have a final walk-through this afternoon and present it tomorrow. But now a good portion of the features that were working and had been promised no longer work. All out of no fault of my own. I understand that these things can happen, but this one is pretty bad and the timing was worse. Like I said, I shouldn't have updated the tools and the Viewer app until after the presentation... but then again, that may have been even worse. At least I was able to get the presentation postponed until Monday... gives me a little more time to figure out what to do.
    Anyways, I did able to get a hold of someone through support and was able to send them some files. It's being looked at as I type this. I do have to give credit to the Adobe support staff, they've been helpful and pretty responsive! Thanks guys!

  • Why am I getting the flag Invalid URL for web content overlay when making scrolling panel in Indesig

    Why am I getting the flag 'Invalid URL for web content overlay" when making scrolling panel in Indesign? Iam making additions to existing articles but the problem is new. The articles were originally made using CS and now I am on CC, which I have just uninstalled and re installed, no difference, can anyone help please? Steve

    Hi Bob, thankyou very much for coming back on this. The flag is coming up towards the end of the preview process on desk top. I have made dozens if not hundreds on my two published apps on the app store, but have not done an update for nearly a year, in which time I have needed a refresher, and as usual went to Lynda. In this case I have followed to the letter your DPS course, which is great, and I found the process of making the scrolling panels somewhat easier than when I started 2-3years ago. Initially I was mystified that the flag talked about url and web content, but just put it down to something I had missed in recent improvements in CC.
    I tried over and over, but always got the same result. I thought at one point it might be because the content of my slide was copy and photo, so for a test I deleted the photo. Same result, and many of my existing slides are copy and picture.
    I also uninstalled Indesign CC and reinstalled in case of corrupted content, I also copied to IDML and relaunch, same problem. I am sure I have made the scrolling content as instructed, The one thing I havn't done is trash my preferences, if you think that would be a good Idea could you please direct me to some content at Lynda on how to do it in CC. Many thanks, Steve

  • Brightness change in other elements while using Scroll Effects on another

    I am using Scroll Effects on a short piece (two words) of text.  The scroll effect takes place on the LEFT hand side of my page.  When rendered to a browser, on the opposite side of the page, two text blocks out of five, which are situated vertically down the RIGHT side of the page start out dimmed at approx. 50% of their natural brightness.  As you scroll down the page, activating the scroll effect on the LEFT side, these two text blocks brighten back up to normal at exactly the point where the "scroll effect text" lands in it's final position.  In other words, it's as if you dimmed the "lights" on some of the text on the opposite side of scroll effect, until you scroll down.  Then it's "lights on!"  It's a cool effect if I could figure out what is doing it, but as it is, it's screwing up the look of my page when it opens.
    All I can come up with is 'Website-Poltergeist'.  Any help or suggestions would be fabulous, PLUS, if this could be controlled, it would be an interesting feature on a page where some element that you want to Pop out as someone scrolled could be accomplished with this 50% brightness.  If I can solve this, I'll post the how and why as a "hidden effect" in Muse.
    Thanks!

    Make sure "Opacity" is not marked in the "Scroll Effects" panel.

  • My scroll panel looks with less color... why?

    Hi there:
    I wonder why my control panel contain (text as example) looks
    softer when I run my SWF. For example, I have set #000000 or my
    black appearance, but it shows like a #333333 or even less... also
    the pictures contained in the scroll panel.. why ? I changed all
    the "Blend options" but nothing to do with it... it must be another
    thing... Please help me with this ASAP, I am in a hurry about
    time... ! thanx a lot in advance,

    maybe just as well, we are getting CS6 this month
    CS6 includes Pantone+ Color Bridge libraries, which use CMYK Process definitions to simulate Pantone solid colors. The new solid library colors (i.e., Pantone+ Coated) are always defined as spot type with Lab definitions—you can no longer switch to CMYK definitions via Ink Manager for the those libraries.
    Pantone+ Color Bridge Coated defines 110 as process CMYK 2|22|100|8. It's not surprising Pantone is always changing the CMYK simulation builds because the appearance of CMYK depends on the printing conditions. Personally I would go for a color managed conversion, allowing that much black in a saturated yellow seems questionable.

  • Trouble using the Web-based utility

    I have a WRT54G wireless router, V8, firmware 8.0.0. It is Ethernet-connected to a Windows Vista machine running SP1.
    I am having trouble using the Web-based utility. I can access it but cannot make any changes.  For instance, if I change the settings on the Setup page and click "save", I get a "This webpage is not available"
    I tried updating the firmware and got the same message. Disabling my personal firewall has no effect. Resetting the router from the button on its rear panel has no effect. I tried using with both Windows IE and Google Chrome browsers and got the same result.
    I have been using this router without problem for months using a a Windows XP machine. This problem may be associated with my changing it to the current Windows Vista machine. I no longer have the Windows XP machine.
    Please help me. Thank you and Happy New Year!
    - tom 

    I spent a full day unsuccessfully trying to make it work, including numerous Linksys utilities downloaded from the site. I could not conjure any support on Linksys chat, and the live body on the Linksys tech support line wanted to charge me $29 for his help.
    I finally succeeded by purchasing and installing a Netgear wireless router ($44, Staples) that came up flawlessly the first time. The Linksys device is in my trash. 

  • Scrolling panel

    I have a customized panel by overriding the "paintComponent" method in the "MyPanel" class, which can display a heatmap graph when executing the program. I put the panel inside a scrollpane, then displayed in a dialog. The code in my dialog class is like following:
    private void createGUI() throws Exception{
        MyPanel mypanel = new MyPanel(node.data);
        JScrollPane scrollPane = new JScrollPane(mypanel);
        scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        this.getContentPane().add(scrollPane);
        setSize(150, 50);
        setLocationRelativeTo(null);
        setVisible(true);
      }The problem is that when the displayed graph is large, I want to scroll the panel, but this does not work.
    It seems that the scroll bar is freezen and can't move either horizontally or vertically.
    Hope you could give some advice on this problem. Your help is greatly appreciated!

    Thank you very much for the answer!
    It works after setting the preferred size for the panel as you suggested, however, I'm not sure why I should do that.
    The only problem happens when I was diplaying big heatmap graph, (for e.g, like 100,000 rows and 3 columns of float data). Heatmap is a graph that can convert and display data in a color map. When I move the vertical scroll bar, the heatmap graph will change from vertical to horizontal displayed, and when I move to the bottom of the graph, the graph will disappear. In another words, I can't use scroll bar to move smoothly and corretly for the big heatmap graph. Hope I could get some advice on this issue.
    Your help is highly appreciated.
    Jenny

Maybe you are looking for

  • Unable to recreate replica as I cannot delete the xml files for the old VM on Hyper-v Cluster

    My setup There are 2 sites each running a Hyper-v 2012-R2 cluster comprising of 5 nodes each. All the machines are in a HA state and stored on the shared clustered resource. Initially we had replication working and it was replicating all the servers

  • Apple firewire missing

    I just upgraded to FCP 5.1.2 and I can't seem to capture video, i keep getting message that apple firewire is missing Can someone please help [email protected] Thanks

  • Epub template for formatting photos and text ebook

    I have formatted a Pages ebook that I want to make into an epub. I used floating photos and shawdows, and background color page, looks good in pdf, but won't convert. Is there a template (other than the boring one on Apple - or having to purchase Des

  • Shared comments

    I seem to end up duplicating a lot of text, especially between getters and setters and property members. I can always use the {@link} syntax but this can lead to a paper trail for the user to find the info they need, and they don't work so well when

  • Woeful state of font management on windows

    anyone out there who has font managment software that autoactivates in indesign at least doesn't make your system slow or unstable even with 5000 fonts. doesn't slow down opening of documents I've now tried font agent pro (no auto activation in cs6),