craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > General QuickTable Support/Help Post New Topic   Post A Reply
adding a scroll bar to QuickTable printer friendly version
next newest post | next oldest post
Author Messages
sandeep.bhatt
Private

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 9

Click here to see the profile for sandeep.bhatt Send email to sandeep.bhatt Send private message to sandeep.bhatt Find more posts by sandeep.bhatt Edit or delete this message Reply w/Quote
Posted Thursday, April 26, 2007 @ 06:41:03  

Hi

this may seem a dumb question

how do i add a scroll bar to QuickTable

or quicktable doesnt have the capability

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, April 30, 2007 @ 01:34:37  

scrollbar will be automatically added once the data exceeds the table view.
jamen
Unregistered
Edit or delete this message Reply w/Quote
Posted Tuesday, September 11, 2007 @ 17:25:22  

My Scrollbar went away when I added code to automatically resize the table to fit the underlying panel. Now I can't get it back no matter how small I squeeze the width. Is there a manual way to force a scrollbar? Always?
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Tuesday, September 11, 2007 @ 22:22:21  

can you remove the code for automatically resize?

can you send me what resize option you enabled?

jamen
Corporal

Gender: Unspecified
Location:
Registered: Sep 2007
Status: Offline
Posts: 22

Click here to see the profile for jamen Send email to jamen Send private message to jamen Find more posts by jamen Edit or delete this message Reply w/Quote
Posted Wednesday, September 12, 2007 @ 09:59:01  

btw, thanks for the quick reply!

I created a class that extends JPanel and then put each of these on a tabbed frame. I want(ed) the dbtable to resize itself when the application main frame was resized.

/************** this is the method that the component resize event calls in the main (parent) class *************
public void jTab_Pane_componentResized(ComponentEvent e) {
pnlReference.setSize(e.getComponent().getSize());
pnlOperators.setSize(e.getComponent().getSize());
}

/*********** this is in the extended class ***********
private void setQtableSize(int w, int h) {

if (w > 10) {
w = w - 10;
}
if (h > 10) {
h = h - 10;
}

// This seems really bogus but it doesn't work without it since setting 'setSize()' by itself does nothing.
qTable.setPreferredSize(new Dimension(w, h));

// Force it to re-layout
this.validate();

}

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, September 12, 2007 @ 20:56:30  

set the layout of the container to border layout and add dbtable to center of border layout. it will resize automatically, you don't need to do anything.
jamen
Corporal

Gender: Unspecified
Location:
Registered: Sep 2007
Status: Offline
Posts: 22

Click here to see the profile for jamen Send email to jamen Send private message to jamen Find more posts by jamen Edit or delete this message Reply w/Quote
Posted Wednesday, September 12, 2007 @ 22:02:15  

OK, I'll have to work through the stack of panels. I'm not in front of the code now, its possible that its using a flow layout since that's JBuilders default but my intent was to use borderlayout. I'll post my results in the morning.

Thanks again for the interaction.

jamen
Corporal

Gender: Unspecified
Location:
Registered: Sep 2007
Status: Offline
Posts: 22

Click here to see the profile for jamen Send email to jamen Send private message to jamen Find more posts by jamen Edit or delete this message Reply w/Quote
Posted Thursday, September 13, 2007 @ 13:33:24  

You were right. Once I declared the layout to be borderlayout it worked as expected.

Thanks

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios