Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8766143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:28:38+00:00 2026-06-13T16:28:38+00:00

At the moment, when you try to manually resize a TopComponent, it will show

  • 0

At the moment, when you try to manually resize a TopComponent, it will show a black line showing the future size of the TopComponent.

enter image description here

I’d like to know what is the JComponent behind this black line? And how can i access it?


EDIT

The first part of my question was answered. The component shown in the attached picture is a JSplitPane.

Right now, i’d like to be able to access it (i.e get the instance of the JSplitPane‘s used for TopComponent resizing in the netbeans platform.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:28:39+00:00Added an answer on June 13, 2026 at 4:28 pm
    • there is JSplitPane,

    • but not sure if Netbeans is compiled in Java (in compare with Eclipse)

      EDIT I'd like to add a listener on it.

    • add PropertyChangeListener to the JSplitPane,

    • there are a few usefull methods for if (propertyName.equals(JSplitPane.XxxXxx))

    • notice for Nested JSplitPane, have to add listener for each of JSplitPanes separatelly

    • for example

    .

    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
    import javax.swing.JTable;
    
    public class JSplitPaneToy {
    
        public static void main(String[] args) {
            JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, makePanel(), makePanel());
            JPanel pnl = new JPanel();
            pnl.setLayout(new GridLayout(4, 1, 10, 10));
            pnl.add(makePanel());
            pnl.add(makePanel());
            pnl.add(makePanel());
            pnl.add(makePanel());
            PropertyChangeListener propertyChangeListener = new PropertyChangeListener() {
    
                public void propertyChange(PropertyChangeEvent changeEvent) {
                    JSplitPane sourceSplitPane = (JSplitPane) changeEvent.getSource();
                    String propertyName = changeEvent.getPropertyName();
                    if (propertyName.equals(JSplitPane.LAST_DIVIDER_LOCATION_PROPERTY)) {
                        int current = sourceSplitPane.getDividerLocation();
                        System.out.println("Current: " + current);
                        Integer last = (Integer) changeEvent.getNewValue();
                        System.out.println("Last: " + last);
                        Integer priorLast = (Integer) changeEvent.getOldValue();
                        System.out.println("Prior last: " + priorLast);
                    }else if (propertyName.equals(JSplitPane.RESIZE_WEIGHT_PROPERTY)) {
                        int current = sourceSplitPane.getDividerLocation();
                        System.out.println("Current: " + current);
                        Integer last = (Integer) changeEvent.getNewValue();
                        System.out.println("Last: " + last);
                        Integer priorLast = (Integer) changeEvent.getOldValue();
                        System.out.println("Prior last: " + priorLast);
                    }
                }
            };
            sp.addPropertyChangeListener(propertyChangeListener);
            JFrame frame = new JFrame("JSplitPane Toy");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setLayout(new GridLayout(0, 2, 10, 10));
            frame.add(sp);
            frame.add(pnl);
            frame.pack();
            frame.setVisible(true);
        }
    
        private static JScrollPane makePanel() {
            JScrollPane pane = new JScrollPane(new JTable(
                    new Object[][]{{0, 1, 2}, {1, 2, 3}, {2, 3, 4}}, new Object[]{1, 2, 3}));
            pane.setPreferredSize(new Dimension(200, 100));
            return pane;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment I am experiencing a very frustrating problem. I will try to
Doing something like this at the moment: try { while ((bytesRead = clientStream.Read(data, 0,
We try to configure maven for run with sonar. At the moment sonar and
There is a moment in my app, that I need to force to show
I'm trying to run .class file from command line. It works when I manually
I'm using matplotlib at the moment to try and visualise some data I am
I am studying the Linux kernel and at the moment I try to implement
At the moment, I try to include addthis social-bookmarks to my site. My problem
At the moment I try to do following: I created several partials (i.e. _show_signature.html.erb)
I have a tree-like model I'd like to show in an NSOutlineView using an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.