Scrolling pane to view selected node

I have a JTree which is inside of a JScrollPane. I sometimes use setSelectionPath(TreePath) to expand a particular Node, but usually it's outside of the viewing area so you don;t notice it. What's the easiest way to get the scroll pane to scroll so the newly selected node is visible?

no problem! I haven't figured how to start that project yet... may take a while before I can find a way to do it. Hey thanks for the link, works great now

Similar Messages

  • Scroll pane can't align it's content

    When a Node(group fro example) is added into a scroll pane, the scroll pane automatically align the node to the upper left corner of the scroll pane's content area. How can i customize the Node's alignment(the middle center eg) in the scroll pane. When the Node's size is scaled and larger than the scroll pane's size the scroll pane's scroll bar appears, and if the Node's size shrinks and it's size becomes smaller than the scroll pane's then the Node is aligned to the middle center. it seems don't take affect if i override the scroll pane's layoutChildren method and set layoutX and layoutY property of the Node.
    If any one can give me some clue?
    thanks

    ScrollPanes are somewhat tricky to use. They don't align content, you need to use layout managers to do that or you need to layout yourself with shapes in groups using absolute co-ordinates and/or translations. The ScrollPane defines it's own viewport related coordinates and you need to layout your content within that viewport.
    How can i customize the Node's alignment(the middle center eg) in the scroll pane.Get the layoutBoundsInParent of the node, get the viewportBounds of the scrollpane and perform the translation of the node such that the center of the node is in the center of the viewportBounds (will require a little bit of basic maths to do this) by adding listeners on each property.
    When the Node's size is scaled and larger than the scroll pane's size the scroll pane's scroll bar appears, and if the Node's size shrinks and it's size becomes smaller than the scroll pane's then the Node is aligned to the middle center.Similar to above, just work with those properties.
    Not exactly a direct answer to your question, but you could try playing around with the following code if you like Saludon. It is something I wrote to learn about JavaFX's layoutbounds system. Resizing the scene and toggling items on and off will allow you to see the scroll pane. The view bounds listeners show you the properties you are interested in to achieve the effect you want.
    import javafx.application.Application;
    import javafx.beans.value.*;
    import javafx.event.*;
    import javafx.geometry.Bounds;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.effect.DropShadow;
    import javafx.scene.layout.*;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.*;
    import javafx.stage.Stage;
    public class LayoutBoundsScrollableAnchorPane extends Application  {
      // define some controls.
      final ToggleButton stroke    = new ToggleButton("Add Border");
      final ToggleButton effect    = new ToggleButton("Add Effect");
      final ToggleButton translate = new ToggleButton("Translate");
      final ToggleButton rotate    = new ToggleButton("Rotate");
      final ToggleButton scale     = new ToggleButton("Scale");
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) throws Exception {
        // create a square to be acted on by the controls.
        final Rectangle square = new Rectangle(20, 30, 100, 100); //square.setFill(Color.DARKGREEN);
        square.setStyle("-fx-fill: linear-gradient(to right, darkgreen, forestgreen)");
        // show the effect of a stroke.
        stroke.setOnAction(new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent actionEvent) {
            if (stroke.isSelected()) {
              square.setStroke(Color.FIREBRICK); square.setStrokeWidth(10); square.setStrokeType(StrokeType.OUTSIDE);
            } else {
              square.setStroke(null); square.setStrokeWidth(0.0); square.setStrokeType(null);
            reportBounds(square);
        // show the effect of an effect.
        effect.setOnAction(new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent actionEvent) {
            if (effect.isSelected()) {
              square.setEffect(new DropShadow());
            } else {
              square.setEffect(null);
            reportBounds(square);
        // show the effect of a translation.
        translate.setOnAction(new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent actionEvent) {
            if (translate.isSelected()) {
              square.setTranslateX(100);
              square.setTranslateY(60);
            } else {
              square.setTranslateX(0);
              square.setTranslateY(0);
            reportBounds(square);
        // show the effect of a rotation.
        rotate.setOnAction(new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent actionEvent) {
            if (rotate.isSelected()) {
              square.setRotate(45);
            } else {
              square.setRotate(0);
            reportBounds(square);
        // show the effect of a scale.
        scale.setOnAction(new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent actionEvent) {
            if (scale.isSelected()) {
              square.setScaleX(2);
              square.setScaleY(2);
            } else {
              square.setScaleX(1);
              square.setScaleY(1);
            reportBounds(square);
        // layout the scene.
        final AnchorPane anchorPane = new AnchorPane();
        AnchorPane.setTopAnchor(square,  0.0);
        AnchorPane.setLeftAnchor(square, 0.0);
        anchorPane.setStyle("-fx-background-color: cornsilk;");
        anchorPane.getChildren().add(square);
        // add a scrollpane and size it's content to fit the pane (if it can).
        final ScrollPane scrollPane = new ScrollPane();
        scrollPane.setContent(anchorPane);
        square.boundsInParentProperty().addListener(new ChangeListener<Bounds>() {
          @Override public void changed(ObservableValue<? extends Bounds> observableValue, Bounds oldBounds, Bounds newBounds) {
            anchorPane.setPrefSize(Math.max(newBounds.getMaxX(), scrollPane.getViewportBounds().getWidth()), Math.max(newBounds.getMaxY(), scrollPane.getViewportBounds().getHeight()));
        scrollPane.viewportBoundsProperty().addListener(
          new ChangeListener<Bounds>() {
          @Override public void changed(ObservableValue<? extends Bounds> observableValue, Bounds oldBounds, Bounds newBounds) {
            anchorPane.setPrefSize(Math.max(square.getBoundsInParent().getMaxX(), newBounds.getWidth()), Math.max(square.getBoundsInParent().getMaxY(), newBounds.getHeight()));
        // layout the scene.
        VBox controlPane = new VBox(10);
        controlPane.setStyle("-fx-background-color: linear-gradient(to bottom, gainsboro, silver); -fx-padding: 10;");
        controlPane.getChildren().addAll(
          HBoxBuilder.create().spacing(10).children(stroke, effect).build(),
          HBoxBuilder.create().spacing(10).fillHeight(false).children(translate, rotate, scale).build()
        VBox layout = new VBox();
        VBox.setVgrow(scrollPane, Priority.ALWAYS);
        layout.getChildren().addAll(scrollPane, controlPane);
        // show the scene.
        final Scene scene = new Scene(layout, 300, 300);
        stage.setScene(scene);
        stage.show();
        reportBounds(square);
      /** output the squares bounds. */
      private void reportBounds(final Node n) {
        StringBuilder description = new StringBuilder();
        if (stroke.isSelected())       description.append("Stroke 10 : ");
        if (effect.isSelected())       description.append("Dropshadow Effect : ");
        if (translate.isSelected())    description.append("Translated 100, 60 : ");
        if (rotate.isSelected())       description.append("Rotated 45 degrees : ");
        if (scale.isSelected())        description.append("Scale 2 : ");
        if (description.length() == 0) description.append("Unchanged : ");
        System.out.println(description.toString());
        System.out.println("Layout Bounds:    " + n.getLayoutBounds());
        System.out.println("Bounds In Local:  " + n.getBoundsInLocal());
        System.out.println("Bounds In Parent: " + n.getBoundsInParent());
        System.out.println();
    }

  • Setting scroll pane initial display size

    hello.
    how can i modify the modified code below so that users of my video library system would be able to view CD/DVD/Game information by name, age category, type and year? the text area is not displaying in a proper size - i have to use the scroll pane to view the data in the text area. i should be able to view the data in the text area without a scrollpane because there is not much data in the database. how can i make the text area bigger?
    thanks.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class ViewProductDetails extends JFrame{
       JPanel pnlBox, pnlBody, pnlFooter; 
       JCheckBox name;
       JCheckBox ageCategory;
       JCheckBox type;
       JCheckBox year;
       JButton returnToProductMenu;
       JTextArea jta;
       Container contentpane;
       Connection db;
       Statement statement;
       public void makeConnection(){
          try{
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          catch(Exception e){
               System.out.println("Problem loading the driver");
       public void setHostURL(){
          String url = "jdbc:odbc:VideoLibrary";
          closeDB();
          try{
             db = DriverManager.getConnection(url,"","");
             statement = db.createStatement();
             DatabaseMetaData dbmd = db.getMetaData();
             ResultSet rs = dbmd.getTables(null, null, null, new String[]{"TABLE"});
          catch(Exception e){
               System.out.println("Could not initialise the database");
               e.printStackTrace();
       public void selectProductOne(){
          try{
             ResultSet rs1 = statement.executeQuery("SELECT * FROM Product ORDER BY name");
             ResultSetMetaData rsmd1 = rs1.getMetaData();
             for(int i = 1; i <= rsmd1.getColumnCount(); i++){
                jta.append(rsmd1.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs1.next()){
                for(int i = 1; i <= rsmd1.getColumnCount(); i++){
                   jta.append(rs1.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException ea){
             ea.printStackTrace();
       public void selectProductTwo(){
          try{
             ResultSet rs2 = statement.executeQuery("SELECT * FROM Product ORDER BY ageCategory");
             ResultSetMetaData rsmd2 = rs2.getMetaData();
             for(int i = 1; i <= rsmd2.getColumnCount(); i++){
                jta.append(rsmd2.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs2.next()){
                for(int i = 1; i <= rsmd2.getColumnCount(); i++){
                   jta.append(rs2.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException eb){
             eb.printStackTrace();
       public void selectProductThree(){
          try{
             ResultSet rs3 = statement.executeQuery("SELECT * FROM Product ORDER BY type");
             ResultSetMetaData rsmd3 = rs3.getMetaData();
             for(int i = 1; i <= rsmd3.getColumnCount(); i++){
                jta.append(rsmd3.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs3.next()){
                for(int i = 1; i <= rsmd3.getColumnCount(); i++){
                   jta.append(rs3.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException ec){
             ec.printStackTrace();
       public void selectProductFour(){
          try{
             ResultSet rs4 = statement.executeQuery("SELECT * FROM Product ORDER BY year");
             ResultSetMetaData rsmd4 = rs4.getMetaData();
             for(int i = 1; i <= rsmd4.getColumnCount(); i++){
                jta.append(rsmd4.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs4.next()){
                for(int i = 1; i <= rsmd4.getColumnCount(); i++){
                   jta.append(rs4.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException ed){
             ed.printStackTrace();
       public void closeDB(){
          try{
             if(statement != null){
                statement.close();
             if(db != null){
                db.close();
          catch(Exception e){
             System.out.println("Could not close the current connection");
             e.printStackTrace();
       public ViewProductDetails(){
          super("View Product Details");
          contentpane = getContentPane();
          contentpane.setLayout(new BorderLayout());
          pnlBox = new JPanel();
          pnlBody = new JPanel();
          pnlFooter = new JPanel();
          jta = new JTextArea();
          jta.setFont(new Font("Serif", Font.PLAIN, 12));
          jta.setLineWrap(true);
          jta.setWrapStyleWord(true);
          jta.setEditable(false);
          name = new JCheckBox("Name");
          ageCategory = new JCheckBox("Age Category");
          type = new JCheckBox("Type");
          year = new JCheckBox("Year");
          pnlBox.add(name);
          pnlBox.add(ageCategory);
          pnlBox.add(type);
          pnlBox.add(year);
          JScrollPane jsp = new JScrollPane(jta);
          pnlBody.add(jsp, BorderLayout.CENTER);
          returnToProductMenu = new JButton("Return To Product Menu");
          pnlFooter.add(returnToProductMenu);
          contentpane.add(pnlBox,BorderLayout.NORTH);
          contentpane.add(pnlBody,BorderLayout.CENTER);
          contentpane.add(pnlFooter,BorderLayout.SOUTH);
          pack();
          setLocationRelativeTo(null);
          setVisible(true);
          name.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductOne();
                closeDB();
          ageCategory.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductTwo();
                closeDB();
          type.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductThree();
                closeDB();  
          year.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductFour();
                closeDB();     
          returnToProductMenu.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                setVisible(false);
       public static void main(String[] args){
          new ViewProductDetails();
    }

    hello.
    thanks for the reply. i did what you told me to do. but when i compile the program i get the following error (both error + code are shown below).
    ----jGRASP exec: javac -g E:\CP4B Project\ViewProductDetails.java
    ViewProductDetails.java:174: cannot find symbol
    symbol : method setPreferredSize()
    location: class javax.swing.JScrollPane
    jsp.setPreferredSize();
    ^
    1 error
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class ViewProductDetails extends JFrame{
       JPanel pnlBox, pnlBody, pnlFooter; 
       JCheckBox name;
       JCheckBox ageCategory;
       JCheckBox type;
       JCheckBox year;
       JButton returnToProductMenu;
       JTextArea jta;
       Container contentpane;
       Connection db;
       Statement statement;
       public void makeConnection(){
          try{
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          catch(Exception e){
               System.out.println("Problem loading the driver");
       public void setHostURL(){
          String url = "jdbc:odbc:VideoLibrary";
          closeDB();
          try{
             db = DriverManager.getConnection(url,"","");
             statement = db.createStatement();
             DatabaseMetaData dbmd = db.getMetaData();
             ResultSet rs = dbmd.getTables(null, null, null, new String[]{"TABLE"});
          catch(Exception e){
               System.out.println("Could not initialise the database");
               e.printStackTrace();
       public void selectProductOne(){
          try{
             ResultSet rs1 = statement.executeQuery("SELECT * FROM Product ORDER BY name");
             ResultSetMetaData rsmd1 = rs1.getMetaData();
             for(int i = 1; i <= rsmd1.getColumnCount(); i++){
                jta.append(rsmd1.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs1.next()){
                for(int i = 1; i <= rsmd1.getColumnCount(); i++){
                   jta.append(rs1.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException ea){
             ea.printStackTrace();
       public void selectProductTwo(){
          try{
             ResultSet rs2 = statement.executeQuery("SELECT * FROM Product ORDER BY ageCategory");
             ResultSetMetaData rsmd2 = rs2.getMetaData();
             for(int i = 1; i <= rsmd2.getColumnCount(); i++){
                jta.append(rsmd2.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs2.next()){
                for(int i = 1; i <= rsmd2.getColumnCount(); i++){
                   jta.append(rs2.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException eb){
             eb.printStackTrace();
       public void selectProductThree(){
          try{
             ResultSet rs3 = statement.executeQuery("SELECT * FROM Product ORDER BY type");
             ResultSetMetaData rsmd3 = rs3.getMetaData();
             for(int i = 1; i <= rsmd3.getColumnCount(); i++){
                jta.append(rsmd3.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs3.next()){
                for(int i = 1; i <= rsmd3.getColumnCount(); i++){
                   jta.append(rs3.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException ec){
             ec.printStackTrace();
       public void selectProductFour(){
          try{
             ResultSet rs4 = statement.executeQuery("SELECT * FROM Product ORDER BY year");
             ResultSetMetaData rsmd4 = rs4.getMetaData();
             for(int i = 1; i <= rsmd4.getColumnCount(); i++){
                jta.append(rsmd4.getColumnName(i) + "    ");
             jta.append("\n");
             while(rs4.next()){
                for(int i = 1; i <= rsmd4.getColumnCount(); i++){
                   jta.append(rs4.getObject(i) + "     ");
                jta.append("\n");
          catch(SQLException ed){
             ed.printStackTrace();
       public void closeDB(){
          try{
             if(statement != null){
                statement.close();
             if(db != null){
                db.close();
          catch(Exception e){
             System.out.println("Could not close the current connection");
             e.printStackTrace();
       public ViewProductDetails(){
          super("View Product Details");
          contentpane = getContentPane();
          contentpane.setLayout(new BorderLayout());
          pnlBox = new JPanel();
          pnlBody = new JPanel();
          pnlFooter = new JPanel();
          jta = new JTextArea();
          jta.setFont(new Font("Serif", Font.PLAIN, 12));
          jta.setLineWrap(true);
          jta.setWrapStyleWord(true);
          jta.setEditable(false);
          name = new JCheckBox("Name");
          ageCategory = new JCheckBox("Age Category");
          type = new JCheckBox("Type");
          year = new JCheckBox("Year");
          pnlBox.add(name);
          pnlBox.add(ageCategory);
          pnlBox.add(type);
          pnlBox.add(year);
          JScrollPane jsp = new JScrollPane(jta);
          jsp.setPreferredSize();
          pnlBody.add(jsp, BorderLayout.CENTER);
          returnToProductMenu = new JButton("Return To Product Menu");
          pnlFooter.add(returnToProductMenu);
          contentpane.add(pnlBox,BorderLayout.NORTH);
          contentpane.add(pnlBody,BorderLayout.CENTER);
          contentpane.add(pnlFooter,BorderLayout.SOUTH);
          pack();
          setLocationRelativeTo(null);
          setVisible(true);
          name.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductOne();
                closeDB();
          ageCategory.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductTwo();
                closeDB();
          type.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductThree();
                closeDB();  
          year.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                makeConnection();
                setHostURL();
                selectProductFour();
                closeDB();     
          returnToProductMenu.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
                setVisible(false);
       public static void main(String[] args){
          new ViewProductDetails();
    }

  • Auto scrolling to a selected node in Tree

    Hi All,
    In my one of my flex application, i am selected nodes in a tree based on some input. However, if my tree is large and the selected node is at the bottom then i cant see what is selected until i scroll down. Is there any automatic way of scrolling to a node when that node is selected?
    Thanks.

    I have tried the following, but it is not working.
    Tree.scrollToIndex(Tree.selectedIndex);
    Any idea?

  • Apply XSLT  while importing the xml to the selected node in structure view

    Hi All,
    I would like to apply XSLT while importing the xml file to the selected node in the structure view.
    How to go about it?
    Thanks
    Sakthi

    Hi All,
       Got the solution,
                    UIDRef documentUIDRef = ::GetUIDRef(activeContext->GetContextDocument());
                InterfacePtr<IDocument> document(documentUIDRef, UseDefaultIID());
                InterfacePtr<IXMLImportOptionsPool> prefsPool( document->GetDocWorkSpace(), UseDefaultIID() );
                InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());
                InterfacePtr<IK2ServiceProvider> serviceProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLImportMatchMakerSignal Service,     kXMLThrowAwayUnmatchedRightMatchMakerServiceBoss));
                InterfacePtr<IXMLImportPreferences> prefs(serviceProvider, IID_IXMLIMPORTPREFERENCES);
                XMLImportPreferencesInitializer initializer(prefs, prefsPool);
                bool16 prefBool = prefs->GetNthPrefAsBool(0);
                prefs->SetNthPref(0, kTrue);
    The above code set the import option "Delete elements, frames, and content that do not match imported XML"
    Thanks
    Sakthi

  • Selecting Multiple Images from Scroll Pane

    Hi,
    I am quite a newbie to Java GUI and can't find a good example on something I wish to do. I got a scroll pane which actually loaded images as a Label. I do this program to upload the images. I already manage to upload the images somehow. But now the problem is I wish to remove the images from the scroll pane. It will be something like this.
    1. Try to put a check box on each JLabel with the image.
    2. Select multiple JLabel images by selecting the check boxes.
    3. Click on the "Remove" button will remove those JLabel Images which has a check box "checked"
    What I am not too sure is,
    how can I be able to detect a group of checkboxes which is checked inside the scroll pane. So that I can actually removes them from the scroll pane. Can anyone show me a good example for it?

    Keep the check boxes in a Collection of some sort. Iterate through it, calling isSelected() on each box.
    Or, add a listener to the checkboxes so that a list of selected images is updated whenever a box is checked or unchecked.
    One of these may suit better than the other depending on circumstances.

  • Some graphics in a website cannot be scrolled, panned or zoomed in/out

    http://professional.wsj.com/article/SB10001424053111903520204576480123949521268.html?mod=WSJ_Home_la...
    the graphics in the above website does not respond to scrolling, panning or zooming gestures. Is there a way to make it happen? without that, major parts of the graphics cannot be viewed.
    unfortunately this is a paid site so you may not be able to load it but i thought may be some of you may be subscribers.
    thanks.
    Solved!
    Go to Solution.

    thanks, aandras.
    in this art there is an interactive graphic which you can access either by 1) clicking on the graphic towards the middle of the article on the left side just above the picture of senator Reid, or 2) clicking on the tab near the start of the article labelled "interactive graphics".
    for me, either way will load that page but the page is not scrollable, zoomable nor pannable. that page actually has a set of 10 different graphics you can select via buttons in the left. oddly these buttons work and actually switch the graphics. but most of them are too large to be displayed on the playbook screen which therefore have to be scrolled/panned but that does not work for me. the page, other thank those buttons, acts as if it is frozen.

  • Scroll Pane - Drag and Drop

    Hello,
    I have to scroll panes and movie clips in the one scroll
    pane while the other is blank. I wanted the user to be able to drag
    the movie clip out of the one scroll pane and drop it into the
    blank one. Any ideas? I'm totally lost on this one.
    Thank You

    Hi Sarojamaly,
    According to your description, when you create a Data Source View in BIDS/SSDT, you can't see the tables in the pane. Right?
    In this scenario, when creating data source, please make sure you select a correct data provider. For example, it you connect to SQL Server database, you should use
    Native OLE DB\SQL Server Native Client. Then please test your connection to the data source.
    If the tables still can't be displayed, please make sure you select proper database and the check tables existence in the database.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • 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.

  • How to scroll at the bottom using scroll pane

    i am having a label in which i have added a scroll pane. dynamically i will add some text to the label. the scroll bar should move to the buttom after addition of text so that the new text added should be visible.
    please provide me a solution.

    Swap from using a JLabel to a JTextArea, then use below to set position viewed. (do this after each time you enter any text)
    yourJTextArea.setCaretPosition(yourJTextArea.getText().length());

  • Panels in a row in a scroll pane.

    Hi,
    in my application, i have a UI frame, which contains a scroll pane that has a panel, which contains a few hundreds of panels, lined up vertically.
    Each of these panels contais an icon, a label, a text field and a few more label fields and more text fields(sometimes)
    When the UI cmes up the parent panel contains only a few(10-15) panels one below another and if we click on the icon, we need to add a few more panels below the panel that contains the label that was clicked.
    In the case, when we click on all the icons in the parent panel, then we need to add a lot of panels and we hit the out of memory exception.
    does anyone have a good solution here.
    The TreeTable UI item would have been perfect here but we can not use them because we dont want to change the look of the UI for backward compatibility reasons.
    Also, every time the icon was clicked, creating and ading the panels is very slow.
    Any help is greatly appreciated.
    regards.

    1. You could create a secondary storyline and edit B-roll into it. It will behave more like tracks. The secondary does have magnetic properties, which many people find hinders the free movement of B-roll.
    2. Again secondaries. But basically you're trying to make the application behave like a tracked application when its essence is to be trackless.
    3. Not seen this.
    4. Doesn't work in FCP. Use copy and paste attributes.
    5. Yes. The homemade titles and effects created in Motion live in a specific folder structure in your Movies folder. That can be shared and duplicated on any Mac with FCP.
    6. There is no one answer to that, events and projects are entirely separate from each other, except that specific events and projects reference each other. You can simplify things so a single event holds all the content for a single project and its versions.
    7. You can't change the import function. It's simply a file transfer as FCP edits it natively. You can select the clips in FCP and change the channel configuration.

  • Scroll pane issues

    I hope someone can help. I have designed a site and on
    certain pages there are scroll panes with jpgs. When I preview the
    movie on my computer everything seems to work fine. When I upload
    it to the server and look at the page the content that is supposed
    to be in the scroll pane is all out of whack. Then I reload the
    page and everything is fine. This only happens in Internet
    Explorer. It works fine in Firefox. Please look at the site
    www.gastropod.ca/new site/index2.html
    This is occurring mostly in the food menu and drink menu.
    Any help would be wickedly appreciated!!!!
    Thanks in advance.
    Ryan

    @sjmphoto0300: I have a Dell XPS 15 502X laptop (running Win 7 Home) and had the same scrolling issue as you in LR 3.6 when in the Library module only (the Develop module sidebar scrolling works fine). I could not scroll using my touchpad on the left or right pane unless my cursor was directly over either thin grey scroll bar or on the actual sidebar headings (e.g. "Catalog," "Folders," or "Quick Develop"). Mousing over the latter would only enable me to scroll until the cursor was no longer over the heading which was pretty useless.
    I have Synaptics TouchPad v7.4 installed. While I don't have an option in my Mouse properties to specify certain programs that don't scroll properly as mentioned in another post, I did find a solution that works for me!
    I had to do TWO things to get scrolling in the sidebars working properly:
    1) In this thread (http://forums.adobe.com/message/3888114#3888114) it was mentioned that the Synaptics scrolling graphic that appears (see screenshot below) interferes with scrolling and the scrolling graphic can be disabled with a registry tweak and then restart the Synaptics applications (2) or reboot.
    2) Right-click an empty spot on the desktop and go to Personalize > Change Mouse Pointers > Device Settings (Synaptics logo on tab) > Settings. Click on Scrolling on the left of the Synaptics Properties window > Scroll item under pointer. Click Enable.
    That got sidebar scrolling working without having to keep the cursor hovering above the skinny scrollbars. It seems like the Synaptics software doesn't recognize what area is always scrollable in Lightroom when "Scroll selected item" is selected.
    Hope this helps someone else out there.

  • Treeview Selected Node is not visible

    Hi
    I have below code snippet
                                TreeNode tn = TreeView1.FindNode(DefaultCustomFolderPath);
                                if (tn != null)
                                TreeView1.CollapseAll();                           
                                tn.SelectAction = TreeNodeSelectAction.SelectExpand;
                                tn.Selected = true;
    This code was working fine when i was having Windows XP OS..
    Now that the XP OS has been upgraded to Windows7, it is showing the collapsed tree view only i.e the selected node is not automatically displayed. If you expand the treeview to the selected node, it is selected/highlighted correctly.
    Please help to solve this issue
    Edit: I am using <asp:TreeView>

    There is a different TreeView for every UI Technology (WinForms, WPF, ASP.Net). Plus several 3rd party TreeViews. Please specify wich one you use and ideall repost in the proper (sub)forum for the UI Technology.
    Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.

  • Problem viewing selected iPhoto video event full screen in iMovie.

    How do I view selected iPhoto video full screen as an event in iMovie?  It always plays the last import instead.  I did follow the instructions, but that does not work.

    Adrian...
    I'm having the same problem!!!!  Mine use to sort from new to old and it changed for some reason?
    I spoke to apple care and they said it mimics the iphoto order... but it doesn't... I've tried everything, including reversing assending and decending in iphoto.
    Like you said, it seems trivial... but it is a pain to scroll to the bottom for everything!
    Someone help us
    Thanks.
    j

  • I am unable to pan my view using my magic mouse in maya.

    i am unable to pan my view using my magic mouse in maya. panning needs a middle mouse button and there is no middle mouse button in magic mouse. scrolling sideways or up and down only zooms in and out. please help.

    In Maya/Preferences/Interface/Devices, click "Two button" for "Mouse tracking." That will let you use opt+click for rotating, and opt+cmd+click for panning.
    If you need actual middle mouse button functionality for any of the tools, then maybe the application Better Touch Tool can help. For the trackpad it has the option "Use special middleclick mode (for CAD users)," which works with three-finger click. I am not sure whether something similar will work for the Magic Mouse.

Maybe you are looking for