Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Stop JSplitPane from going up

  1. #1
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Stop JSplitPane from going up

    When I drag the JSplitPane I want it to stop at a certain point... how do I do that? Thank you
    It can stretch horizontally as much as it pleases but when I grag it vertically I want it to stop at a certain point. Thank you


    Second very important problem I really need to contact the admins or some moderator because I had to create a new profile because I don't get the mail to reset the passwrd... thank you very much...

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Stop JSplitPane from going up

    Do you have code that shows what you are asking about?
    Something that will compile and execute for testing.

    I don't know if this site sends any emails.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2021
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Stop JSplitPane from going up

    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);

    home.panel_tabella_vendi.setPreferredSize(new Dimension(0, 150));
    JPanel sotto = new JPanel();

    this.setLayout(new BorderLayout());
    // jPanel_sopra.setMaximumSize(new Dimension());
    this.add(jPanel_sopra, java.awt.BorderLayout.NORTH);

    this.add(home.panel_tabella_vendi, java.awt.BorderLayout.SOUTH);
    this.add(sotto, java.awt.BorderLayout.CENTER);

    splitPane.setTopComponent(home.panel_tabella_vendi );
    sotto.setPreferredSize(new Dimension(0, 100));
    // sotto.setMaximumSize(new Dimension(-1, 100));

    splitPane.setBottomComponent(sotto);
    splitPane.setDividerSize(10);

    splitPane.setContinuousLayout(true);
    splitPane.setOneTouchExpandable(true);

    this.add(splitPane);

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Stop JSplitPane from going up

    Sorry, that code will not compile for testing.

    Please edit your post and wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 3
    Last Post: March 30th, 2014, 05:32 AM
  2. Stop a thread?
    By sci4me in forum Threads
    Replies: 1
    Last Post: May 25th, 2013, 06:55 PM
  3. Loop won't stop. Please help.
    By A1one1nDarkness in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 3rd, 2011, 10:11 AM
  4. [B]Insert a JFrame and a JTable in a JSplitPane[/B]
    By sincerelibran in forum AWT / Java Swing
    Replies: 1
    Last Post: January 23rd, 2011, 01:59 PM

Tags for this Thread