CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Stuck on Java GUI Program

    I have a problem with a Java GUI program I am writing.
    I am trying to display a list of icons for a virtual (emulated) directory.
    That works fine, but I want to clip the display region and use a scrollbar.
    So, following some examples I found online, I create a JScrollPane and added my JPanel containing my directory JList.
    The problem is, I am also showing a button and textbox in the same JFrame, and the scrollbar scrolls this too. I only want the scrollbar to scroll the JPanel with the JList.
    I tried creating the JScrollPane and adding that to my JPanel, but the JList panel didn't display.

    Can someone please help me figure out what I'm doing wrong?
    I only want to scroll the JList panel.


    I've attached my code, which compiles using the JDK 1.6
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured