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 6817533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:04:02+00:00 2026-05-26T21:04:02+00:00

I got a JViewport correctly scrolling using the default layout manager (using viewport.setViewPosition), but

  • 0

I got a JViewport correctly scrolling using the default layout manager (using viewport.setViewPosition), but when I call setLayout(null) this no longer works.

Any ideas?

I can give code if needs be, but it’s pretty messy at the moment.

Thanks!

Edit: Thanks for the info so far. I’ve been using a null layout so I can absolutely position components I draw later, is there a way I can do with whilst using a layout manager?

  • 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-05-26T21:04:03+00:00Added an answer on May 26, 2026 at 9:04 pm

    Scroll panes only work when the preferred size of the component added to the scroll pane is greater than the size of the scroll pane.

    When you use a null layout, the preferred size is 0, so the scroll pane doesn’t work. That is why you should use a layout manager. It will determine the preferred size for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Got some code that is not mine and its producing this warning atm: iehtmlwin.cpp(264)
I'd consider myself a reasonable standard CSS/XHTML chap but I'm pretty baffled by this.
I'm writing an isometric game, but unfortunately I've got stuck writing with the algorithm
From the examples I have found, this code should add the newPanel to viewport
I'm trying to configure a viewport for mobile Safari. Using the viewport meta tag,
I've got a solution for keeping a sidebar in the viewport as you scroll
Got a problem using XSL to produce PDF in JAVA. Always get No LayoutManager
Got a relatively simple MySQL query that I'm pulling using php with the following
I got a camera set up with _aspectRatio = device.Viewport.AspectRatio; _projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(90.0f),_aspectRatio,0.1f,10000.0f); The
Got this errors keeps appeared repeatedly Here is my line 20 on functions.php $wp_query->max_num_pages

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.