Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 17th, 2006, 7:23 AM   #1
hemanth.balaji
Programmer
 
Join Date: May 2005
Posts: 54
Rep Power: 0 hemanth.balaji is an unknown quantity at this point
Send a message via Yahoo to hemanth.balaji Send a message via Skype™ to hemanth.balaji
Is there a Floating Scrollbar component for Tables

I have a table which is placed in a Panel. This panel contains a Horizonal Scroll Bar which when scrolled to the right enables us to see the whole JTable. Now the Table itself has a vertical scrollbar.

The probelm is when the user can't see the whole table he does not know that that the table contains a vertical scroll bar.

Is there a way to make the vertical scrollbar of the table floating so that even when you scroll to the right the vertical scrollbar of the table is scrolling as you scroll to the right by clicking on the panel scrollbar

Regards,
Hemanth
http://www.freejavaguide.com
hemanth.balaji is offline   Reply With Quote
Old Jul 17th, 2006, 10:18 AM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Can you put up your code so I can understand what you need to do. I don't understand the problem.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jul 17th, 2006, 10:47 AM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
What he's saying is that the horizontal scrollbar deals with the entire window (or panel), while the vertical scrollbar is part of the table. If you scroll the part of the table which contains the scrollbar off-screen, the user can't see that the table even has a vertical scrollbar. I'm not familiar with the Java that the OP is using, but I have a similar situation on an HTML page. I just control it so that there's no horizontal scroll bar -- the whole dam' shooting match fits on the screen, horizontally. If the user selects a lebenty-leben point font, then it just wraps between each letter. I realize that one can't always avoid horizontal scrollbars, but it's a situation to be strived for, presentationally speaking.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 17th, 2006, 11:02 AM   #4
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Thanks for the clearing that up for me.

@O.P.: try using the JScrollPane class. It would put the panel into a container that automatically comes with a veritical and horizontal scrollbar. It will be on the outside of the container. Try that. Post back.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jul 17th, 2006, 11:21 AM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Resizing the table to be the same size as, or smaller than, the window that contains it would likely negate the need for the window to have its own scroll bars. I suggest using a BorderLayout and placing the table in the BorderLayout.CENTER so that it will expand to the edges of the window.
titaniumdecoy is offline   Reply With Quote
Old Jul 17th, 2006, 11:54 AM   #6
hemanth.balaji
Programmer
 
Join Date: May 2005
Posts: 54
Rep Power: 0 hemanth.balaji is an unknown quantity at this point
Send a message via Yahoo to hemanth.balaji Send a message via Skype™ to hemanth.balaji
Guys, Thanx for the replies
hemanth.balaji is offline   Reply With Quote
Old Jul 17th, 2006, 1:49 PM   #7
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Can you post your code?
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a custom ListBox component. Chesso Delphi 1 Mar 12th, 2006 1:55 AM
jpegor jpg component The_Iddiot Delphi 2 Jul 9th, 2005 8:01 PM
Chekit out: Luban the new component oriented scritping language peterx Coder's Corner Lounge 11 Feb 24th, 2005 12:45 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:31 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC