🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11349

A JScrollPane problem

#11349
From: Andrew Ho
Date: Mon, 14 Jun 1999 00:00
42 lines
2106 bytes
    I've got a Panel which contains a search panel with a number of
search criteria fields (currently set to 2).
For some reason, after the search is performed, this search subpanel
(which is indeed a JScrollPane) resizes itself and displays only one of
the two criteria fields (along with a vertical scrollbar). Everything
works fine but when clicking onto the up/down arrows of the scrollbar,
the pane scrolls VERY VERY slowly and occasionally the GUI freezes.

    Here are my questions:
   1) Is this issue costed by the way I set up the Gui or is this a
Swing bug?
    2) Is there any method in JScrollPane/JScrollBar which allows me to
set the speed for the scrolling arrows?

    I couldn't find any bug reports from javasoft.com regarding a
similar problem for JScrollPane. The following shows how my JScrollPane
is initialiated. Note that IafPanel is a Panel which extends JPanel.

Thank you in advance.
Andrew Ho

 private void configureSearchPanel()
 {
  this.removeAll();
  this.setLayout(new BorderLayout());
  IafPanel panel = new IafPanel();
  JScrollPane scrollPane = new JScrollPane(panel);
  panel.setLayout(new SimpleGridLayout());
  //panel.setLayout(new GridLayout());

  /**
   * Create layout for text field items
   * Number of columns is determined by constant (defined at top)
   */
  for (int count = 0; count < (_textfieldVector.size()); count++)
  {
   panel.add((IafLabel)_labelVector.elementAt(count));
   panel.add((SearchItemTextFieldVC)_textfieldVector.elementAt(count));
  }
  this.add(scrollPane, BorderLayout.CENTER);

 }
Technical Details
Message-ID: <37653625.62E0B02C@solect.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,862ed51a7c8e3d64,start
X-Google-Attributes: gid111d45,public
From: Andrew Ho <andrew.ho@solect.com>
Subject: A JScrollPane problem
Date: 1999/06/14
Message-ID: <37653625.62E0B02C@solect.com>
X-Deja-AN: 489501371
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing