Remove/Hide scroll bars in scroll panes.

Hi all,
I am pretty new to action script. I am building a photo gallery and I am loading the thumbnails from an XML file into a scroll pane dynamically. As the scroll pane fills up, it gets wider to accomodate the thumbnails. There is one row, and eventually, I want to have the user be able to mouse left or right and have the scroll pane scroll, versus clicking on the bar or the left/right arrows. However, in order to accomplish this, I need the scroll bars to disappear!
Is there anyway to either remove or hide both the x and y scroll bars on a scroll pane? My scroll pane is called: thumbPane.
Thanks in advance!
-Rob

Hello friend,
                   first select scrollpane.Then open parameters panel (if dont know go to window > properties > paramiters ) turn to OFF HorizontalScrollPolicy  and verticalScrollPoliy then left and right scroll Bar will not display.
THANKS.

Similar Messages

  • Want to remove scroll bar from navigation pane in Web Template

    HI All,
    I have a report created in WAD.When I am using navigation pane, I get a scroll bar there.
    I want to remove that scroll bar from navigation pane.Tried increasing the height in the property of same but nothing is helping.
    The expanded option should be ON and do not want to group characteristics shown in nav. pane.
    Please suggest, if there is any other way to do that.
    Thanks,
    Anu

    Why do you want to expand it? Generally when you click on Nav pane, it should show the assigned chars under it. No scroll bar comes up with  below settings:-

  • How to get a scroll bar to scroll down as new elements are added

    I have a JPanel that displays a list of information. As new information is added to the bottom of the list, a scroll bar appears. I require the scroll bar to scroll down as the new elements are added so that the most recent one's are in view all the time. Any ideas on how to do this?
    Thanks

    before adding each component.
    get the scrollbar object
    store the
    ScrollBar sb = JFrame.getScrollBar();
    int cmax = scrollbar.getVisibleAmount();
    add component .....
    int nmax = scrollbar.getVisibleAmount();
    int diff = nmax - cmax;
    sb.setValue(sb.getValue() + diff);
    assuming you can get the scrollbar object from the
    JFrame, ContentPane of JScrollPane.

  • RIPPLE EFFECT when using mouse to click on scroll bar and scroll

    Has anyone else had this problem? I have tried 4 new 24" iMac's and ALL FOUR do this! When you click on the scroll bar and scroll down or up, there is a definite "ripple" in the window of what you are looking at. It's as if you put a steel rod under a sheet and pulled it up and down. It only happens when using the mouse to click and scroll. Not with the track ball, not with the arrows, not with the keyboard. I updated Safari, tried using Firefox instead, installed all the OS updates, but it still happens. So far no one in Support has a clue. The display models at the stores didn't do it, but my guess is they are from an older shipment...so maybe this is an anomaly with imac's shipped after April 10.
    Try it on your computer and see if it happens. If so, we need to all let Apple know there needs to be a fix.

    HI,
    Quit Safari.
    Go here: MacintoshHD/Library/Preferences and locate this file.
    com.apple.windowserver.plist
    Drag that file to the Desktop. Launch Safari and see if the scroll functions as it should. If it's ok, drag that file to the trash, empty the Trash and restart your Mac.
    Carolyn

  • Remove horiztonal scroll bar in search pane

    RH8.0.2 HTML.
    Hi all, wondering if anyone has a fix for the horizontal scroll bar that popups up in my search pane for webhelp.
    I've gone to great lengths to get my help in the right sized window with no horizontal scroll bars - they annoy me soooo much.
    But now, and always I have noticed, they appear in the search pane when results are displayed. No matter how far i widen it they do not go away.
    Is there some work aorund for this?
    Thanks.
    Nick

    Hi,
    The search results are written in a HTML-file, are they not?
    Checked in RH7, but I think it's the same in RH8:
    In wfhdhtml.htm, the search windows is build using frames. Look for the frame that calls whfbody.htm. On the end of the line is the text scrolling='yes', set that to no.
    If that doesn't work, I'll check in RH8 when I have the Chance.
    Greet,
    Willam
    This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

  • Question on vertical scroll bars in JScroll Pane

    Hi,
    I managed to display my chat program with a vertical scroll bars by using JScrollPane. Every time some on types a line, this is appended to whatever was previously in the JTextArea (the JScrollPane has a JTextArea in it). Even though this works fine, when the dimension of the JTextArea is full with text, one has to scroll down to see what was the last line of text that was typed.
    Is there a way to make the verticall scroll area alwas scrolled down (I mean, scrolled to the bottom so I can see new incoming text without manually having to scroll it down?)
    Thanks!
    Cecilia.

    You might try adding a properties listener to the JTextArea listening for a "resize/size" property change and when it does, force the scroll bar to go to max.

  • JTextArea w/Scroll bar wont scroll AND code drops through if statements

    Hi, I'm still having trouble with the text area in the following code. When you run the code, you get the top arrow on the scroll bar, but the bottom is cut off. Also, a big problem is that no matter what choice is selected from the combo box, the code drops through to the last available value each time. Someone on the forums suggested using an array list for the values in the combo box, but I have not been able to figure out how to do that. A quick example would be apprciated.
    Thank you in advance for any help
    //Import required libraries
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    import java.text.*;
    import java.math.*;
    import java.util.*;
    //Create the class
    public class Week3Assignment407B extends JFrame implements ActionListener
         //Panels used in container
         private JPanel jPanelRateAndTermSelection;         
         //Variables for Menu items
         private JMenuBar menuBar;    
         private JMenuItem exitMenuItem; 
         private JMenu fileMenu; 
         //Variables for user instruction and Entry       
         private JLabel jLabelPrincipal;   
         private JPanel jPanelEnterPrincipal;  
         private JLabel jLabelChooseRateAndTerm; 
         private JTextField jTextFieldMortgageAmt;
         //Variables for combo box and buttons
         private JComboBox TermAndRate;
         private JButton buttonCompute;
         private JButton buttonNew; 
         private JButton buttonClose;
         //Variables display output
         private JPanel jPanelPaymentOutput;
         private JLabel jLabelPaymentOutput;
         private JPanel jPanelErrorOutput;
         private JLabel jLabelErrorOutput;  
         private JPanel jPanelAmoritizationSchedule;
         private JTextArea jTextAreaAmoritization;
         // Constructor 
         public Week3Assignment407B() {            
              super("Mortgage Application");      
               initComponents();      
         // create a method that will initialize the main frame for the GUI
          private void initComponents()
              setSize(700,400);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      
              Container pane = getContentPane();
              GridLayout grid = new GridLayout(15, 1);
              pane.setLayout(grid);       
              //declare all of the panels that will go inside the main frame
              // Set up the menu Bar
              menuBar = new JMenuBar();
              fileMenu = new JMenu();
              fileMenu.setText("File");        
              exitMenuItem = new JMenuItem(); 
               exitMenuItem.setText("Exit");
              fileMenu.add(exitMenuItem); 
              menuBar.add(fileMenu);       
              pane.add(menuBar);
              //*******************TOP PANEL ENTER PRINCIPAL*****************************//
              // Create a label that will advise user to enter a principle amount
              jPanelEnterPrincipal = new JPanel(); 
              jLabelPrincipal = new JLabel("Amt to borrow in whole numbers");
              jTextFieldMortgageAmt = new JTextField(10);
              GridLayout Principal = new GridLayout(1,2);
              jPanelEnterPrincipal.setLayout(Principal); 
                jPanelEnterPrincipal.add(jLabelPrincipal);
              jPanelEnterPrincipal.add(jTextFieldMortgageAmt);
              pane.add(jPanelEnterPrincipal);
              //****************MIDDLE PANEL CHOOSE INTEREST RATE AND TERM*****************//
              // Create a label that will advise user to choose an Int rate and term combination
              // from the combo box
              jPanelRateAndTermSelection = new JPanel();
              jLabelChooseRateAndTerm = new JLabel("Choose the Rate and Term");
              buttonCompute = new JButton("Compute Mortgage");
              buttonNew = new JButton("New Mortgage");
              buttonClose = new JButton("Close");
              GridLayout RateAndTerm = new GridLayout(1,5);
              //FlowLayout RateAndTerm = new FlowLayout(FlowLayout.LEFT);
              jPanelRateAndTermSelection.setLayout(RateAndTerm);
              jPanelRateAndTermSelection.add(jLabelChooseRateAndTerm);
              TermAndRate = new JComboBox();
              jPanelRateAndTermSelection.add(TermAndRate);
              TermAndRate.addItem("7 years at 5.35%");
              TermAndRate.addItem("15 years at 5.5%");
              TermAndRate.addItem("30 years at 5.75%");
              jPanelRateAndTermSelection.add(buttonCompute);
              jPanelRateAndTermSelection.add(buttonNew);
              jPanelRateAndTermSelection.add(buttonClose);
              pane.add(jPanelRateAndTermSelection);
              //**************BOTTOM PANEL TEXT AREA FOR AMORITIZATION SCHEDULE***************//
              jPanelAmoritizationSchedule = new JPanel();
              jTextAreaAmoritization = new JTextArea(26,50);
              // add scroll pane to output text area
                   JScrollPane scrollBar = new JScrollPane(jTextAreaAmoritization, 
                   JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                     JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              jPanelAmoritizationSchedule.add(scrollBar);
                pane.add(jPanelAmoritizationSchedule);
              //***************ADD THE ACTION LISTENERS TO THE GUI COMPONENTS*****************//
              // Add ActionListener to the buttons and menu item
              exitMenuItem.addActionListener(this);
              buttonCompute.addActionListener(this);         
              buttonNew.addActionListener(this);
              buttonClose.addActionListener(this);
              TermAndRate.addActionListener(this);
              jTextFieldMortgageAmt.addActionListener(this);
              //*************** Set up the Error output area*****************//
              jPanelErrorOutput = new JPanel();
              jLabelErrorOutput = new JLabel();
              FlowLayout error = new FlowLayout();
              jPanelErrorOutput.setLayout(error);
              pane.add(jLabelErrorOutput);
              setContentPane(pane);
              pack();
              setVisible(true);
         //Display error messages
         private void OutputError(String ErrorMsg){
              jLabelErrorOutput.setText(ErrorMsg);
              jPanelErrorOutput.setVisible(true);
         //create a method that will clear all fields when the New Mortgage button is chosen
         private void clearFields()
              jTextAreaAmoritization.setText("");
              jTextFieldMortgageAmt.setText("");
         //**************CREATE THE CLASS THAT ACTUALLY DOES SOMETHING WITH THE EVENT*****//
         //This is the section that receives the action source and directs what to do with it
         public void actionPerformed(ActionEvent e)
              Object source = e.getSource();
              String ErrorMsg;
              double principal;
              double IntRate;
              int Term;
              double monthlypymt;
              double TermInYears = 0 ;
              if(source == buttonClose)
                   System.exit(0);
              if (source == exitMenuItem) {      
                       System.exit(0);
              if (source == buttonNew)
                   clearFields();
              if (source == buttonCompute)
                   //Make sure the user entered valid numbers
                   try
                        principal = Double.parseDouble(jTextFieldMortgageAmt.getText());
                   catch(NumberFormatException nfe)
                        ErrorMsg = (" You Entered an invalid Mortgage amount"
                                  + " Please try again. Please do not use commas or decimals");
                        jTextAreaAmoritization.setText(ErrorMsg);
                   principal = Double.parseDouble(jTextFieldMortgageAmt.getText());
                    if (TermAndRate.getSelectedItem() == "7 years at 5.35%") ;
                        Term = 7;
                        IntRate = 5.35;
                    if (TermAndRate.getSelectedItem()  == "15 years at 5.5%") ;
                        Term = 15;
                        IntRate = 5.5;
                    if (TermAndRate.getSelectedItem() == "30 years at 5.75%") ;
                        Term = 30;
                        IntRate = 5.75;
                   //Variables have been checked for valid input, now calculate the monthly payment
                   NumberFormat formatter = new DecimalFormat ("$###,###.00");
                   double intdecimal = intdecimal = IntRate/(12 * 100);
                   int months = Term * 12;
                   double monthlypayment = principal *(intdecimal / (1- Math.pow((1 + intdecimal),-months)));
                   //Display the Amoritization schedule
                   jTextAreaAmoritization.setText(" Loan amount of " + formatter.format(principal)
                                                    + "\n"
                                                    + " Interest Rate is " +  IntRate + "%"
                                            + "\n"
                                            + " Term in Years "  + Term
                                            + " Monthly payment "+  formatter.format(monthlypayment)
                                            + "\n"
                                            + "  Amoritization is as follows:  "
                                            + "------------------------------------------------------------------------");
         public Insets getInsets()
              Insets around = new Insets(35,20,20,35);
              return around;
         //Main program     
         public static void main(String[]args) { 
              Week3Assignment407B frame = new Week3Assignment407B(); 
       }

    here's your initComponents with a couple of changes, the problem was the Gridlayout(15,1)
    also, the scrollpane needed a setPreferredSize()
      private void initComponents()
        setSize(700,400);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Container pane = getContentPane();
        JPanel pane = new JPanel();
        //GridLayout grid = new GridLayout(15, 1);
        GridLayout grid = new GridLayout(2, 1);
        pane.setLayout(grid);
        menuBar = new JMenuBar();
        fileMenu = new JMenu();
        fileMenu.setText("File");
        exitMenuItem = new JMenuItem();
        exitMenuItem.setText("Exit");
        fileMenu.add(exitMenuItem);
        menuBar.add(fileMenu);
        //pane.add(menuBar);
        setJMenuBar(menuBar);
        jPanelEnterPrincipal = new JPanel();
        jLabelPrincipal = new JLabel("Amt to borrow in whole numbers");
        jTextFieldMortgageAmt = new JTextField(10);
        GridLayout Principal = new GridLayout(1,2);
        jPanelEnterPrincipal.setLayout(Principal);
          jPanelEnterPrincipal.add(jLabelPrincipal);
        jPanelEnterPrincipal.add(jTextFieldMortgageAmt);
        pane.add(jPanelEnterPrincipal);
        jPanelRateAndTermSelection = new JPanel();
        jLabelChooseRateAndTerm = new JLabel("Choose the Rate and Term");
        buttonCompute = new JButton("Compute Mortgage");
        buttonNew = new JButton("New Mortgage");
        buttonClose = new JButton("Close");
        GridLayout RateAndTerm = new GridLayout(1,5);
        jPanelRateAndTermSelection.setLayout(RateAndTerm);
        jPanelRateAndTermSelection.add(jLabelChooseRateAndTerm);
        TermAndRate = new JComboBox();
        jPanelRateAndTermSelection.add(TermAndRate);
        TermAndRate.addItem("7 years at 5.35%");
        TermAndRate.addItem("15 years at 5.5%");
        TermAndRate.addItem("30 years at 5.75%");
        jPanelRateAndTermSelection.add(buttonCompute);
        jPanelRateAndTermSelection.add(buttonNew);
        jPanelRateAndTermSelection.add(buttonClose);
        pane.add(jPanelRateAndTermSelection);
        jPanelAmoritizationSchedule = new JPanel();
        jTextAreaAmoritization = new JTextArea(26,50);
        JScrollPane scrollBar = new JScrollPane(jTextAreaAmoritization,
          JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollBar.setPreferredSize(new Dimension(500,100));//<------------------------
        jPanelAmoritizationSchedule.add(scrollBar);
        getContentPane().add(pane,BorderLayout.NORTH);
        getContentPane().add(jPanelAmoritizationSchedule,BorderLayout.CENTER);
        exitMenuItem.addActionListener(this);
        buttonCompute.addActionListener(this);
        buttonNew.addActionListener(this);
        buttonClose.addActionListener(this);
        TermAndRate.addActionListener(this);
        jTextFieldMortgageAmt.addActionListener(this);
        jPanelErrorOutput = new JPanel();
        jLabelErrorOutput = new JLabel();
        FlowLayout error = new FlowLayout();
        jPanelErrorOutput.setLayout(error);
        //pane.add(jLabelErrorOutput);not worrying about this one
        //setContentPane(pane);
        pack();
        setVisible(true);
      }instead of
    if (TermAndRate.getSelectedItem() == "7 years at 5.35%") ;
    Term = 7;
    IntRate = 5.35;
    you would be better off setting up arrays
    int[] term = {7,15,30};
    double[] rate = {5.35,5.50,5.75};
    then using getSelectedIndex()
    int loan = TermAndRate.getSelectedIndex()
    Term = term[loan];
    IntRate = rate[loan];

  • On the right side of the br5owser there is a scroll bar, that scroll bar does not have any contrast and is almost invisible, can't find it ???

    Have seen some other questions similar to mine and they may be about same issue , but they say that the scroll bar vanishes, in effect it is still there but nearly invisible. Trying to click on it without knowing the exact location however causes the page to scroll uncontrolled. The other questions advised people to reset their browser to default but that didn't help at all. Have had this same issue for about the last 6 versions of firefox, all say in the 30s versions. Tried adding high contrast in Windows as an experiment but that didn't help at all either. Been trying help for some time and just now decided to ask my own question as other questioners may have given up or answerers may think it is resolved.
    In searching through help files it has led me to find a space based theme for the browser that I enjoy, but does not solve issue of course, so... all is not lost. Took a jpg of the image of the browser that shows the issue and am trying to upload it but looks like it is stuck in upload mode. Ugh "high speed" , anyhow maybe it uploaded and is not showing, the bar on the right is about 3/4 of the way down the side if you can see it, almost invisible.

    Did you try Firefox Safe Mode?

  • Scroll bar isnt scrolling

    I tried to input a text from a css, which its height is greater than the target text field, so a scroll bar was placed.
    but I was wonder that why the scroll bar doesnt enable scrolling after loading the text.
    thanks
    import fl.text.TLFTextField;
    import fl.controls.UIScrollBar;
    var loader:URLLoader = new URLLoader();
    var targetXML:XML = new XML();
    var txtField:TLFTextField = new TLFTextField();
    var scrollBar:UIScrollBar = new UIScrollBar();
    txtField.width = 300;
    txtField.height = 300;
    addChild(txtField);
    scrollBar.x = txtField.width + scrollBar.width;
    scrollBar.height = txtField.height;
    addChild(scrollBar);
    loader.load(new URLRequest("http://blahblahblah"));
    loader.addEventListener("complete", loadComplete);
    function loadComplete(e):void {
        targetXML = XML(loader.data);
        txtField.htmlText = targetXML.channel.item[0].description;

    sorry I forgot that
    but even I assigned the scroll bar to the text field, the scroll bar still cant scroll...
    import fl.text.TLFTextField;
    import fl.controls.UIScrollBar;
    var loader:URLLoader = new URLLoader();
    var targetXML:XML = new XML();
    var txtField:TLFTextField = new TLFTextField();
    var scrollBar:UIScrollBar = new UIScrollBar();
    txtField.width = 300;
    txtField.height = 300;
    addChild(txtField);
    scrollBar.x = txtField.width + scrollBar.width;
    scrollBar.height = txtField.height;
    scrollBar.scrollTarget = txtField;
    addChild(scrollBar);
    loader.load(new URLRequest("http://feeds.feedburner.com/TEDTalks_video"));
    loader.addEventListener("complete", loadComplete);
    function loadComplete(e):void {
        targetXML = XML(loader.data);
        txtField.htmlText = targetXML;

  • Scroll bar only scrolls the top ~300 pixels

    The latest update of Nightly is unusable. The scroll bar only changes the top 300 pixels or so of the page. Then the links do not work in the bottom portion, and you can't see the entire page.
    Troubleshooting info:
    "application": {
    "name": "Firefox",
    "version": "36.0a1",
    "userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0",
    "supportURL": "https://support.mozilla.org/1/firefox/36.0a1/WINNT/en-US/",
    "numTotalWindows": 2,
    "numRemoteWindows": 0
    "crashes": {
    "submitted": [],
    "pending": 0
    "modifiedPreferences": {
    "browser.cache.disk.capacity": 358400,
    "browser.cache.disk.smart_size.first_run": false,
    "browser.cache.frecency_experiment": 1,
    "browser.places.smartBookmarksVersion": 7,
    "browser.sessionstore.upgradeBackup.latestBuildID": "20141022030202",
    "browser.startup.homepage_override.mstone": "36.0a1",
    "browser.startup.homepage_override.buildID": "20141022030202",
    "dom.mozApps.used": true,
    "extensions.lastAppVersion": "36.0a1",
    "media.gmp-gmpopenh264.lastUpdate": 1414067969,
    "media.gmp-gmpopenh264.version": "1.1",
    "media.gmp-manager.lastCheck": 1414067968,
    "network.cookie.prefsMigrated": true,
    "places.history.expiration.transient_current_max_pages": 104858,
    "plugin.disable_full_page_plugin_for_types": "application/pdf",
    "privacy.sanitize.migrateFx3Prefs": true
    "lockedPreferences": {},
    "graphics": {
    "numTotalWindows": 2,
    "numAcceleratedWindows": 0,
    "windowLayerManagerType": "Basic",
    "windowLayerManagerRemote": true,
    "numAcceleratedWindowsMessage": [
    "blockedGfxCard"
    "adapterDescription": "RDPDD Chained DD",
    "adapterVendorID": "0x0000",
    "adapterDeviceID": "0x0000",
    "adapterSubsysID": "00000000",
    "adapterRAM": "Unknown",
    "adapterDrivers": "RDPDD",
    "driverVersion": "",
    "driverDate": "",
    "adapterDescription2": "",
    "adapterVendorID2": "",
    "adapterDeviceID2": "",
    "adapterSubsysID2": "",
    "adapterRAM2": "",
    "adapterDrivers2": "",
    "driverVersion2": "",
    "driverDate2": "",
    "isGPU2Active": false,
    "direct2DEnabled": false,
    "directWriteEnabled": false,
    "directWriteVersion": "6.1.7601.17563",
    "direct2DEnabledMessage": [
    "blockedGfxCard"
    "webglRendererMessage": [
    "blockedGfxCard"
    "info": {
    "AzureCanvasBackend": "skia",
    "AzureSkiaAccelerated": 0,
    "AzureFallbackCanvasBackend": "cairo",
    "AzureContentBackend": "cairo"
    "javaScript": {
    "incrementalGCEnabled": true
    "accessibility": {
    "isActive": false,
    "forceDisabled": 0
    "libraryVersions": {
    "NSPR": {
    "minVersion": "4.10.7",
    "version": "4.10.7"
    "NSS": {
    "minVersion": "3.17.2 Basic ECC",
    "version": "3.17.2 Basic ECC"
    "NSSUTIL": {
    "minVersion": "3.17.2",
    "version": "3.17.2"
    "NSSSSL": {
    "minVersion": "3.17.2 Basic ECC",
    "version": "3.17.2 Basic ECC"
    "NSSSMIME": {
    "minVersion": "3.17.2 Basic ECC",
    "version": "3.17.2 Basic ECC"
    "userJS": {
    "exists": false
    "extensions": [
    "name": "McAfee Security Scan Plus",
    "version": "1.0",
    "isActive": false,
    "id": "{e4f94d1e-2f53-401e-8885-681602c0ddd8}"
    "experiments": []
    }

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Mouse scroll bar stopped scrolling

    Hi,
    My scroll bar has stopped scrolling. How do I get it to work again?
    Thanks in advance.

    Hi moreton, Welcome to Apple's Users Help Users Forums.
    Do a forum search on clean MM or Mighty Mouse.
    In essence dampen clothe with water or alcohol and press down wheel and scrub rather vigorously in all directions.

  • Geting a SCROLL BAR to scroll

    hi i have create this application using JBuilder6 and it has a JTextArea within a JPanel, but i cannot get the text to scroll.
    Any comments welcomed.
    d code:
    package com.borland.samples.gary;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    * <p>Author: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    public class Frame1 extends JFrame {
      JPanel contentPane;
      JButton jButton1 = new JButton();
      FlowLayout flowLayout1 = new FlowLayout();
      JButton jButton2 = new JButton();
      JButton jButton3 = new JButton();
      JButton jButton4 = new JButton();
      JScrollPane jScrollPane1 = new JScrollPane();
      JTextArea jTextArea2 = new JTextArea();
      Border border1;
      //Construct the frame
      public Frame1() {
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        try {
          jbInit();
        catch(Exception e) {
          e.printStackTrace();
      //Component initialization
      private void jbInit() throws Exception  {
        //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
        contentPane = (JPanel) this.getContentPane();
        border1 = BorderFactory.createEmptyBorder();
        jButton1.setText("jButton1");
        contentPane.setLayout(flowLayout1);
        this.setSize(new Dimension(400, 300));
        this.setTitle("Frame Title");
        jButton2.setText("jButton2");
        jButton3.setText("jButton3");
        jButton4.setText("jButton4");
        jTextArea2.setPreferredSize(new Dimension(250, 170));
        jTextArea2.setMargin(new Insets(3, 3, 3, 3));
        jTextArea2.setLineWrap(true);
        jTextArea2.setWrapStyleWord(true);
        jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        jScrollPane1.setViewportBorder(border1);
        jScrollPane1.setNextFocusableComponent(jTextArea2);
        jScrollPane1.addMouseListener(new java.awt.event.MouseAdapter() {
          public void mousePressed(MouseEvent e) {
            jScrollPane1_mousePressed(e);
        contentPane.add(jButton1, null);
        contentPane.add(jButton2, null);
        contentPane.add(jButton3, null);
        contentPane.add(jButton4, null);
        contentPane.add(jScrollPane1, null);
        jScrollPane1.getViewport().add(jTextArea2, null);
      //Overridden so we can exit when window is closed
      protected void processWindowEvent(WindowEvent e) {
        super.processWindowEvent(e);
        if (e.getID() == WindowEvent.WINDOW_CLOSING) {
          System.exit(0);
      void jScrollPane1_mousePressed(MouseEvent e) {
        jTextArea2.append("mouussee pressed");
    }cheers Brendan2003

    Change jTextArea2.setPreferredSize() to jScrollPane1.setPreferredSize(). As it stands now, you are telling the text area that you don't want it to change size, if at all possible, so it doesn't.

  • How can I hide horizontal scroll bar?

    Some websites use CSS code (overflow-x: hidden or overflow-y:hidden), that shows the horizontal scroll bar while the frame on the website is centered and only 800 pixels wide, but I really don't need my horizontal scroll bar to show up. So how can I hide it?
    Thanks!

    If you use <b>overflow: hidden</b> then you shouldn't see a scroll bar (overflow:scroll does that).<br />
    If that doesn't work then try to add the !important; or use the code in Stylish or to userContent.css in the chrome folder.
    *http://kb.mozillazine.org/userContent.css
    *https://developer.mozilla.org/en/CSS/@-moz-document

  • Different Scroll bars in one file

    I've manually customized the look and feel of the scroll bars for scroll pane component and it works fine. I've two different files that have different visual styles for scroll bars. Now I want to merge these two files meaning I want to have one file with two different styles of scrollbars co-existing. I can resolve the naming conflicts but both of the them are using same asset names and action scripts (I think in the class definition).
    So basically my question if how can I have two different scroll bars implemented in one file?
    Many thanks

    You can make the clip that you want to play at 2 fps seem
    that way by just making it longer. Alternately, you could use a
    timed tween.

  • Scroll Bar with achor-type functionality

    Hi all,
    I was wondering if anyone has any reference to a horizontal
    scroll bar that scrolls a MovieClip and its functionality includes
    the ability to jump to a specific y position of the movieClip
    inside of the ScrollBar MovieClip and of course the scroll bar
    would move to its correct coordinates. For example, I need the
    MovieClip to go 333 pixels down (this is pretty easy) and then tell
    the scroll bar to go to its corresponding location. Anyone have a
    good example of this that is pretty dynamic?
    I have an example of this which is close to working, but I
    would like to know if there is a better more dynamic way of doing
    it.
    Thanks!!!

    Continuing this conversation with myself, I opted to use the
    ScrollPane component and use the vPosition property. We had to use
    all the event listeners before it worked,
    my_sp.addEventListener("complete", listener);
    my_sp.addEventListener("progress", listener);
    my_sp.addEventListener("scroll", listener);
    This worked well and I could feed the vposition and wind up
    where I needed to go in the scroll pane.
    So now I am having a problem with skinning the scroll pane. I
    can skin it just fine. But seeing as my scroll bar, the scroller in
    the middle of the scroll pane that you drag to get to the location
    you want to go is different in size from the original (aka scroll
    thumb). It does not adjust its size so it believes it has something
    like 56 more pixels in either direction.
    What happens is the scroll thumb will start 56 pixels below
    where it should and it stops about 56 pixels before it should stop.
    So, your content finishes scrolling and your scroll thumb does not
    finish its entire scroll - it is hanging 56 pixels above where it
    should. You drag it back to the top, the content that is being
    scrolled is back at it original position where it should be while
    the scroll thumb is hanging about 56 pixels below where it should
    ultimately be.
    Is there a way to adjust the size of the middle scroller
    – what in the skins is called the scroll thumb? I need it at
    a constant size. I can re-skin it so it looks like it should but it
    does not function as it should.
    Any suggestions?
    Anybody I can call at Adobe? (Should I send smoke signals?
    Rent the Goodyear blimb to post my Flash follies in desperation to
    solve this problem?)

Maybe you are looking for